diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-16 18:55:27 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-16 18:55:27 -0400 |
| commit | 7ea98fce723f7cc2710317f4b09cfb812a2a38bc (patch) | |
| tree | 79dd977dfe75d261d2747ba13ece4d8b47d758f0 /newctrl | |
| parent | 3345ae3189969cee7b43d3d2dd0cde9eefdf3afb (diff) | |
Accidentally flipped margined logic on Group.
Diffstat (limited to 'newctrl')
| -rw-r--r-- | newctrl/group_windows.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/newctrl/group_windows.go b/newctrl/group_windows.go index 85292c1..2ce434c 100644 --- a/newctrl/group_windows.go +++ b/newctrl/group_windows.go @@ -57,10 +57,10 @@ func (g *group) preferredSize(d *sizing) (width, height int) { if g.margined { // unforutnately, as mentioned above, the size of a groupbox includes the label and border // 1DLU on each side should be enough to make up for that; if not, we can change it + marginRectDLU(&r, -groupYMarginTop, -groupYMarginBottom, -groupXMargin, -groupXMargin, d) + } else { // TODO make these named constants marginRectDLU(&r, -1, -1, -1, -1, d) - } else { - marginRectDLU(&r, -groupYMarginTop, -groupYMarginBottom, -groupXMargin, -groupXMargin, d) } return int(r.right - r.left), int(r.bottom - r.top) } @@ -81,9 +81,9 @@ func (g *group) resize(x int, y int, width int, height int, d *sizing) { r.bottom = C.LONG(height) if g.margined { // see above - marginRectDLU(&r, 1, 1, 1, 1, d) - } else { marginRectDLU(&r, groupYMarginTop, groupYMarginBottom, groupXMargin, groupXMargin, d) + } else { + marginRectDLU(&r, 1, 1, 1, 1, d) } g.child.resize(int(r.left), int(r.top), int(r.right - r.left), int(r.bottom - r.top), d) } |
