summaryrefslogtreecommitdiff
path: root/prefsize_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'prefsize_darwin.go')
-rw-r--r--prefsize_darwin.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/prefsize_darwin.go b/prefsize_darwin.go
index 46d72a7..ae53b8b 100644
--- a/prefsize_darwin.go
+++ b/prefsize_darwin.go
@@ -27,6 +27,12 @@ func pbarPrefSize(control C.id) (width int, height int) {
return int(r.width), int(r.height)
}
+// Areas know their own preferred size
+func areaPrefSize(control C.id) (width int, height int) {
+ r := C.areaPrefSize(control)
+ return int(r.width), int(r.height)
+}
+
var prefsizefuncs = [nctypes]func(C.id) (int, int){
c_button: controlPrefSize,
c_checkbox: controlPrefSize,
@@ -35,6 +41,7 @@ var prefsizefuncs = [nctypes]func(C.id) (int, int){
c_label: controlPrefSize,
c_listbox: listboxPrefSize,
c_progressbar: pbarPrefSize,
+ c_area: areaPrefSize,
}
func (s *sysData) preferredSize() (width int, height int) {