diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-18 12:47:19 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-18 12:47:19 -0400 |
| commit | b1ac28cc938d2de25357328d9da910a84a2cc8cc (patch) | |
| tree | d34d26f0022dd0e9d9c7179bd59b1c4dbe7b6942 /newctrl/checkbox_windows.go | |
| parent | 0f6e65188af0c4b1d3e4dff17ceb96bbd8ebb271 (diff) | |
Fixed parenting weirdnesses.
Diffstat (limited to 'newctrl/checkbox_windows.go')
| -rw-r--r-- | newctrl/checkbox_windows.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } |
