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/checkbox_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'newctrl/checkbox_windows.go') diff --git a/newctrl/checkbox_windows.go b/newctrl/checkbox_windows.go index ffabbdc..4ccd5e2 100644 --- a/newctrl/checkbox_windows.go +++ b/newctrl/checkbox_windows.go @@ -24,7 +24,7 @@ func newCheckbox(text string) *checkbox { controlSingleHWNDWithText: newControlSingleHWNDWithText(hwnd), toggled: newEvent(), } - c.fpreferredSize = c.preferredSize + c.fpreferredSize = c.xpreferredSize c.SetText(text) C.controlSetControlFont(c.hwnd) C.setCheckboxSubclass(c.hwnd, unsafe.Pointer(c)) @@ -68,7 +68,7 @@ const ( checkboxXFromLeftOfBoxToLeftOfLabel = 12 ) -func (c *checkbox) preferredSize(d *sizing) (width, height int) { +func (c *checkbox) xpreferredSize(d *sizing) (width, height int) { return fromdlgunitsX(checkboxXFromLeftOfBoxToLeftOfLabel, d) + int(c.textlen), fromdlgunitsY(checkboxHeight, d) } -- cgit v1.2.3