Improved non-margined filled Group margins on Windows.

This commit is contained in:
Pietro Gagliardi 2014-10-25 23:28:24 -04:00
parent d0fa80155d
commit af2657e17e
1 changed files with 3 additions and 3 deletions

View File

@ -68,9 +68,9 @@ func (g *group) xpreferredSize(d *sizing) (width, height int) {
marginRectDLU(&r, -groupYMarginTop, -groupYMarginBottom, -groupXMargin, -groupXMargin, d)
} else {
// 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; TODO is not, we can change it
// 1 character cell (4DLU x, 8DLU y) on each side (but only 3DLU on the bottom) should be enough to make up for that; TODO is not, we can change it
// TODO make these named constants
marginRectDLU(&r, -1, -1, -1, -1, d)
marginRectDLU(&r, -8, -3, -4, -4, d)
}
return int(r.right - r.left), int(r.bottom - r.top)
}
@ -92,7 +92,7 @@ func (g *group) xresize(x int, y int, width int, height int, d *sizing) {
// see above
marginRectDLU(&r, groupYMarginTop, groupYMarginBottom, groupXMargin, groupXMargin, d)
} else {
marginRectDLU(&r, 1, 1, 1, 1, d)
marginRectDLU(&r, 8, 3, 4, 4, d)
}
g.child.resize(int(r.left), int(r.top), int(r.right - r.left), int(r.bottom - r.top), d)
}