Improved non-margined filled Group margins on Windows.
This commit is contained in:
parent
d0fa80155d
commit
af2657e17e
|
@ -68,9 +68,9 @@ func (g *group) xpreferredSize(d *sizing) (width, height int) {
|
||||||
marginRectDLU(&r, -groupYMarginTop, -groupYMarginBottom, -groupXMargin, -groupXMargin, d)
|
marginRectDLU(&r, -groupYMarginTop, -groupYMarginBottom, -groupXMargin, -groupXMargin, d)
|
||||||
} else {
|
} else {
|
||||||
// unforutnately, as mentioned above, the size of a groupbox includes the label and border
|
// 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
|
// 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)
|
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
|
// see above
|
||||||
marginRectDLU(&r, groupYMarginTop, groupYMarginBottom, groupXMargin, groupXMargin, d)
|
marginRectDLU(&r, groupYMarginTop, groupYMarginBottom, groupXMargin, groupXMargin, d)
|
||||||
} else {
|
} 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)
|
g.child.resize(int(r.left), int(r.top), int(r.right - r.left), int(r.bottom - r.top), d)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue