From 8bacbf8cd6bbdc89ef8f596c2310c147ccdbc509 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 3 Mar 2014 14:50:03 -0500 Subject: Wrapped Mac OS X Listboxes in NSScrollViews. Their preferredSize seems to be more reasonable now. Now to just add scrollbars... --- prefsize_darwin.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'prefsize_darwin.go') diff --git a/prefsize_darwin.go b/prefsize_darwin.go index 0629153..f958c71 100644 --- a/prefsize_darwin.go +++ b/prefsize_darwin.go @@ -12,7 +12,6 @@ Cocoa doesn't provide a reliable way to get the preferred size of a control (you var ( _sizeToFit = sel_getUid("sizeToFit") // _frame in sysdata_darwin.go - // _documentView in listbox_darwin.go ) // standard case: control immediately passed in @@ -24,8 +23,7 @@ func controlPrefSize(control C.id) (width int, height int) { // NSTableView is actually in a NSScrollView so we have to get it out first func listboxPrefSize(control C.id) (width int, height int) { -// return controlPrefSize(C.objc_msgSend_noargs(control, _documentView)) - return controlPrefSize(control) + return controlPrefSize(listboxInScrollView(control)) } var prefsizefuncs = [nctypes]func(C.id) (int, int){ -- cgit v1.2.3