summaryrefslogtreecommitdiff
path: root/prefsize_darwin.m
diff options
context:
space:
mode:
Diffstat (limited to 'prefsize_darwin.m')
-rw-r--r--prefsize_darwin.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/prefsize_darwin.m b/prefsize_darwin.m
index 521b767..2f3dd7a 100644
--- a/prefsize_darwin.m
+++ b/prefsize_darwin.m
@@ -72,4 +72,18 @@ struct xsize pbarPrefSize(id control)
s.width = (intptr_t) r.size.width;
s.height = (intptr_t) r.size.height;
return s;
+}
+
+struct xsize areaPrefSize(id scrollview)
+{
+ NSView *c;
+ NSRect r;
+ struct xsize s;
+
+ c = areaInScrollView(toNSScrollView(scrollview));
+ // don't size to fit; the frame size is already the size we want
+ r = [c frame];
+ s.width = (intptr_t) r.size.width;
+ s.height = (intptr_t) r.size.height;
+ return s;
} \ No newline at end of file