diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-16 19:35:50 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-16 19:35:50 -0400 |
| commit | d6ae3afeb4b5e9550f6c6b088ba30265d2a9c1a9 (patch) | |
| tree | 52164cbaa68db6f8649f21bf5eba53d8847660a8 /newctrl/group_windows.go | |
| parent | 7ea98fce723f7cc2710317f4b09cfb812a2a38bc (diff) | |
Added margined to Group and reworked the test. Now for spacing.
Diffstat (limited to 'newctrl/group_windows.go')
| -rw-r--r-- | newctrl/group_windows.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/newctrl/group_windows.go b/newctrl/group_windows.go index 2ce434c..ee406d8 100644 --- a/newctrl/group_windows.go +++ b/newctrl/group_windows.go @@ -36,6 +36,14 @@ func (g *group) SetText(text string) { g.setText(text) } +func (g *group) Margined() bool { + return g.margined +} + +func (g *group) SetMargined(margined bool) { + g.margined = margined +} + const ( groupXMargin = 6 groupYMarginTop = 11 // note this value /includes the groupbox label/ @@ -55,10 +63,10 @@ func (g *group) preferredSize(d *sizing) (width, height int) { r.bottom = C.LONG(height) // use negative numbers to increase the size of the rectangle 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 { + // 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 // TODO make these named constants marginRectDLU(&r, -1, -1, -1, -1, d) } |
