diff options
author | 2012-09-17 12:43:29 +0200 | |
---|---|---|
committer | 2012-09-17 12:43:29 +0200 | |
commit | 94e31246b25426d0b7521a206a5710ab1a5000f7 (patch) | |
tree | 2f23e810a04d9679e8cdf0b636a1297b3e995a71 /tabpage.go | |
parent | Add SystemColorBrush (diff) | |
download | wireguard-windows-94e31246b25426d0b7521a206a5710ab1a5000f7.tar.xz wireguard-windows-94e31246b25426d0b7521a206a5710ab1a5000f7.zip |
TabPage: Use SystemColorBrush for background
Diffstat (limited to 'tabpage.go')
-rw-r--r-- | tabpage.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -10,8 +10,12 @@ import . "github.com/lxn/go-winapi" const tabPageWindowClass = `\o/ Walk_TabPage_Class \o/` +var tabPageBackgroundBrush Brush + func init() { MustRegisterWindowClass(tabPageWindowClass) + + tabPageBackgroundBrush, _ = NewSystemColorBrush(COLOR_WINDOW) } type TabPage struct { @@ -34,12 +38,7 @@ func NewTabPage() (*TabPage, error) { tp.children = newWidgetList(tp) - b, err := NewSolidColorBrush(Color(GetSysColor(COLOR_WINDOW))) - if err != nil { - return nil, err - } - - tp.SetBackground(b) + tp.SetBackground(tabPageBackgroundBrush) return tp, nil } |