summaryrefslogtreecommitdiff
path: root/prefsize_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-15 20:14:44 -0400
committerPietro Gagliardi <[email protected]>2014-05-15 20:14:44 -0400
commitb7db0e15cda8ebd63831b19b59ebebb5236d3bcf (patch)
tree15703d21a32cd727641599fa0a9638755d5506bd /prefsize_darwin.go
parent9d8976ababebfd7ce670cdb05e3bc303ac466bf6 (diff)
Removed all the objc_getClass() and sel_getUid() calls from the Go code on Mac OS X. Also got rid of a forgotten objc_msgSend(). Now comes the Objective-C half...
Diffstat (limited to 'prefsize_darwin.go')
-rw-r--r--prefsize_darwin.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/prefsize_darwin.go b/prefsize_darwin.go
index 8cea526..69ac670 100644
--- a/prefsize_darwin.go
+++ b/prefsize_darwin.go
@@ -11,11 +11,6 @@ import "C"
Cocoa doesn't provide a reliable way to get the preferred size of a control (you're supposed to use Interface Builder and have it set up autoresizing for you). The best we can do is call [control sizeToFit] (which is defined for NSControls and has a custom implementation for the other types here) and read the preferred size. Though this changes the size, we're immediately overriding the change on return from sysData.preferredSize(), so no harm done. (This is similar to what we are doing with GTK+, except GTK+ does not actually change the size.)
*/
-var (
- _sizeToFit = sel_getUid("sizeToFit")
- // _frame in sysdata_darwin.go
-)
-
// standard case: control immediately passed in
func controlPrefSize(control C.id) (width int, height int) {
r := C.controlPrefSize(control)