racket/gui: make list-box% columns more consistent across platforms
Cocoa: use ellipses instead of line wrapping
Gtk: allow column sizing below title width
Merge to v5.3.4
(cherry picked from commit 33700427f2
)
This commit is contained in:
parent
6edaeee9b0
commit
f6aa505e99
|
@ -21,6 +21,8 @@
|
||||||
(import-class NSScrollView NSTableView NSTableColumn NSCell NSIndexSet)
|
(import-class NSScrollView NSTableView NSTableColumn NSCell NSIndexSet)
|
||||||
(import-protocol NSTableViewDataSource)
|
(import-protocol NSTableViewDataSource)
|
||||||
|
|
||||||
|
(define NSLineBreakByTruncatingTail 4)
|
||||||
|
|
||||||
(define-objc-class RacketTableView NSTableView
|
(define-objc-class RacketTableView NSTableView
|
||||||
#:mixins (FocusResponder KeyMouseResponder CursorDisplayer)
|
#:mixins (FocusResponder KeyMouseResponder CursorDisplayer)
|
||||||
[wxb]
|
[wxb]
|
||||||
|
@ -30,6 +32,7 @@
|
||||||
(let ([c (tell (tell NSCell alloc) initTextCell: #:type _NSString
|
(let ([c (tell (tell NSCell alloc) initTextCell: #:type _NSString
|
||||||
(if wx (send wx get-cell column row) "???"))]
|
(if wx (send wx get-cell column row) "???"))]
|
||||||
[font (and wx (send wx get-cell-font))])
|
[font (and wx (send wx get-cell-font))])
|
||||||
|
(tellv c setLineBreakMode: #:type _NSUInteger NSLineBreakByTruncatingTail)
|
||||||
(when font
|
(when font
|
||||||
(tellv c setFont: font))
|
(tellv c setFont: font))
|
||||||
c)
|
c)
|
||||||
|
|
|
@ -162,6 +162,7 @@
|
||||||
#f)])
|
#f)])
|
||||||
(when headers?
|
(when headers?
|
||||||
(gtk_tree_view_column_set_resizable column #t)
|
(gtk_tree_view_column_set_resizable column #t)
|
||||||
|
(gtk_tree_view_column_set_min_width column 1)
|
||||||
(when click-headers?
|
(when click-headers?
|
||||||
(gtk_tree_view_column_set_clickable column #t))
|
(gtk_tree_view_column_set_clickable column #t))
|
||||||
(when reorder-headers?
|
(when reorder-headers?
|
||||||
|
|
Loading…
Reference in New Issue
Block a user