From b1ac28cc938d2de25357328d9da910a84a2cc8cc Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 18 Oct 2014 12:47:19 -0400 Subject: Fixed parenting weirdnesses. --- newctrl/button_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'newctrl/button_windows.go') diff --git a/newctrl/button_windows.go b/newctrl/button_windows.go index 6937473..ff5a251 100644 --- a/newctrl/button_windows.go +++ b/newctrl/button_windows.go @@ -24,7 +24,7 @@ func newButton(text string) *button { controlSingleHWNDWithText: newControlSingleHWNDWithText(hwnd), clicked: newEvent(), } - b.fpreferredSize = b.preferredSize + b.fpreferredSize = b.xpreferredSize b.SetText(text) C.controlSetControlFont(b.hwnd) C.setButtonSubclass(b.hwnd, unsafe.Pointer(b)) @@ -54,7 +54,7 @@ const ( buttonHeight = 14 ) -func (b *button) preferredSize(d *sizing) (width, height int) { +func (b *button) xpreferredSize(d *sizing) (width, height int) { // comctl32.dll version 6 thankfully provides a method to grab this... var size C.SIZE -- cgit v1.2.3