cocoa, gtk: enable auto list-box% horizontal scrollbars
Closes PR 12149 Also adjust id on NSTableColumn to be a string, because a Cocoa warning on Lion told me to.
This commit is contained in:
parent
28afc4490e
commit
ec25a74b97
|
@ -95,7 +95,7 @@
|
||||||
(define cols
|
(define cols
|
||||||
(for/list ([title (in-list columns)])
|
(for/list ([title (in-list columns)])
|
||||||
(let ([col (as-objc-allocation
|
(let ([col (as-objc-allocation
|
||||||
(tell (tell NSTableColumn alloc) initWithIdentifier: content-cocoa))])
|
(tell (tell NSTableColumn alloc) initWithIdentifier: #:type _NSString title))])
|
||||||
(tellv content-cocoa addTableColumn: col)
|
(tellv content-cocoa addTableColumn: col)
|
||||||
(tellv (tell col headerCell) setStringValue: #:type _NSString title)
|
(tellv (tell col headerCell) setStringValue: #:type _NSString title)
|
||||||
col)))
|
col)))
|
||||||
|
@ -105,6 +105,7 @@
|
||||||
|
|
||||||
(tellv cocoa setDocumentView: content-cocoa)
|
(tellv cocoa setDocumentView: content-cocoa)
|
||||||
(tellv cocoa setHasVerticalScroller: #:type _BOOL #t)
|
(tellv cocoa setHasVerticalScroller: #:type _BOOL #t)
|
||||||
|
(tellv cocoa setHasHorizontalScroller: #:type _BOOL #t)
|
||||||
(unless (memq 'column-headers style)
|
(unless (memq 'column-headers style)
|
||||||
(tellv content-cocoa setHeaderView: #f))
|
(tellv content-cocoa setHeaderView: #f))
|
||||||
(define allow-multi? (not (eq? kind 'single)))
|
(define allow-multi? (not (eq? kind 'single)))
|
||||||
|
|
|
@ -142,7 +142,7 @@
|
||||||
(set-selection 0)))
|
(set-selection 0)))
|
||||||
|
|
||||||
(define gtk (as-gtk-allocation (gtk_scrolled_window_new #f #f)))
|
(define gtk (as-gtk-allocation (gtk_scrolled_window_new #f #f)))
|
||||||
(gtk_scrolled_window_set_policy gtk GTK_POLICY_NEVER GTK_POLICY_ALWAYS)
|
(gtk_scrolled_window_set_policy gtk GTK_POLICY_AUTOMATIC GTK_POLICY_ALWAYS)
|
||||||
|
|
||||||
(define headers? (memq 'column-headers style))
|
(define headers? (memq 'column-headers style))
|
||||||
(define click-headers? (and headers?
|
(define click-headers? (and headers?
|
||||||
|
|
Loading…
Reference in New Issue
Block a user