summaryrefslogtreecommitdiff
path: root/prefsize_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-03 14:50:03 -0500
committerPietro Gagliardi <[email protected]>2014-03-03 14:50:03 -0500
commit8bacbf8cd6bbdc89ef8f596c2310c147ccdbc509 (patch)
tree296963398c5463c0c9d91410d966d91c1bbc99ff /prefsize_darwin.go
parentdd2abbaccef9e29644baa0090f10ef062235cae4 (diff)
Wrapped Mac OS X Listboxes in NSScrollViews. Their preferredSize seems to be more reasonable now. Now to just add scrollbars...
Diffstat (limited to 'prefsize_darwin.go')
-rw-r--r--prefsize_darwin.go4
1 files changed, 1 insertions, 3 deletions
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){