diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2015-08-06 18:04:26 +0200 |
---|---|---|
committer | Alexander Neumann <alexander.neumann@picos-software.com> | 2015-08-06 18:04:26 +0200 |
commit | 33f7f411e98854a35caeb9dbc5b33a771ee4f8c6 (patch) | |
tree | ec9dab78a1f7d43a0903fda1033edf161144ac04 /groupbox.go | |
parent | Add FocusedWindow package level function (diff) | |
download | wireguard-windows-33f7f411e98854a35caeb9dbc5b33a771ee4f8c6.tar.xz wireguard-windows-33f7f411e98854a35caeb9dbc5b33a771ee4f8c6.zip |
Improve font propagation
Diffstat (limited to 'groupbox.go')
-rw-r--r-- | groupbox.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/groupbox.go b/groupbox.go index 7f2cb506..821eef88 100644 --- a/groupbox.go +++ b/groupbox.go @@ -59,8 +59,8 @@ func NewGroupBox(parent Container) (*GroupBox, error) { } // Set font to nil first to outsmart SetFont. - gb.font = nil - gb.SetFont(defaultFont) + // gb.font = nil + // gb.SetFont(defaultFont) gb.MustRegisterProperty("Title", NewProperty( func() interface{} { @@ -113,14 +113,10 @@ func (gb *GroupBox) ClientBounds() Rectangle { return Rectangle{cb.X + 1, cb.Y + 14, cb.Width - 2, cb.Height - 9} } -func (gb *GroupBox) SetFont(value *Font) { - if value != gb.font { - setWindowFont(gb.hWndGroupBox, value) +func (gb *GroupBox) applyFont(font *Font) { + setWindowFont(gb.hWndGroupBox, font) - gb.font = value - - gb.composite.SetFont(value) - } + gb.composite.applyFont(font) } func (gb *GroupBox) SetSuspended(suspend bool) { |