From 33700427f26b14704dc4e4f315e36b6cc597e219 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 11 Apr 2013 16:23:58 -0600 Subject: [PATCH] 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 --- collects/mred/private/wx/cocoa/list-box.rkt | 3 +++ collects/mred/private/wx/gtk/list-box.rkt | 1 + 2 files changed, 4 insertions(+) diff --git a/collects/mred/private/wx/cocoa/list-box.rkt b/collects/mred/private/wx/cocoa/list-box.rkt index 55f921de07..919b12fc0c 100644 --- a/collects/mred/private/wx/cocoa/list-box.rkt +++ b/collects/mred/private/wx/cocoa/list-box.rkt @@ -21,6 +21,8 @@ (import-class NSScrollView NSTableView NSTableColumn NSCell NSIndexSet) (import-protocol NSTableViewDataSource) +(define NSLineBreakByTruncatingTail 4) + (define-objc-class RacketTableView NSTableView #:mixins (FocusResponder KeyMouseResponder CursorDisplayer) [wxb] @@ -30,6 +32,7 @@ (let ([c (tell (tell NSCell alloc) initTextCell: #:type _NSString (if wx (send wx get-cell column row) "???"))] [font (and wx (send wx get-cell-font))]) + (tellv c setLineBreakMode: #:type _NSUInteger NSLineBreakByTruncatingTail) (when font (tellv c setFont: font)) c) diff --git a/collects/mred/private/wx/gtk/list-box.rkt b/collects/mred/private/wx/gtk/list-box.rkt index 94b536bb23..daf2179b18 100644 --- a/collects/mred/private/wx/gtk/list-box.rkt +++ b/collects/mred/private/wx/gtk/list-box.rkt @@ -162,6 +162,7 @@ #f)]) (when headers? (gtk_tree_view_column_set_resizable column #t) + (gtk_tree_view_column_set_min_width column 1) (when click-headers? (gtk_tree_view_column_set_clickable column #t)) (when reorder-headers?