diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2018-12-05 17:16:22 +0100 |
---|---|---|
committer | Alexander Neumann <alexander.neumann@picos-software.com> | 2018-12-05 17:16:22 +0100 |
commit | 7a11130599653e551115e6e4bd5f6e1f69649b40 (patch) | |
tree | d425dfa662fc38d395ca9891880669dcd23c29d9 | |
parent | Label reform (diff) | |
download | wireguard-windows-7a11130599653e551115e6e4bd5f6e1f69649b40.tar.xz wireguard-windows-7a11130599653e551115e6e4bd5f6e1f69649b40.zip |
Fix label drawing when no background is set + add comment about dynamic line wrapping
-rw-r--r-- | brush.go | 2 | ||||
-rw-r--r-- | declarative/textlabel.go | 2 | ||||
-rw-r--r-- | static.go | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -196,6 +196,8 @@ func (*SystemColorBrush) simple() bool { return true } +var sysColorBtnFaceBrushSingleton, _ = NewSystemColorBrush(SysColorBtnFace) + type SolidColorBrush struct { brushBase color Color diff --git a/declarative/textlabel.go b/declarative/textlabel.go index 0eef43f7..430c85fc 100644 --- a/declarative/textlabel.go +++ b/declarative/textlabel.go @@ -32,7 +32,7 @@ type TextLabel struct { Enabled Property Font Font MaxSize Size - MinSize Size + MinSize Size // Set MinSize.Width to a value > 0 to enable dynamic line wrapping. Name string OnBoundsChanged walk.EventHandler OnKeyDown walk.KeyEventHandler @@ -170,7 +170,7 @@ func (s *static) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uint bg, wnd := s.backgroundEffective() if bg == nil { - break + bg = sysColorBtnFaceBrushSingleton } s.prepareDCForBackground(dis.HDC, s.hWnd, wnd) |