aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-09-04 11:26:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-05 22:03:21 -0600
commit7d4528ab06bff93059ec7f930ef326a7301975ed (patch)
tree204ad702a26c0b8b2695608c7411776014a1b541 /ui
parentui: do not initialize in global init() (diff)
downloadwireguard-windows-7d4528ab06bff93059ec7f930ef326a7301975ed.tar.xz
wireguard-windows-7d4528ab06bff93059ec7f930ef326a7301975ed.zip
ui: fix log view alternating row high-contrast theme switching issue
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'ui')
-rw-r--r--ui/logpage.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/ui/logpage.go b/ui/logpage.go
index 82b32cca..bdf20c2d 100644
--- a/ui/logpage.go
+++ b/ui/logpage.go
@@ -11,8 +11,6 @@ import (
"strings"
"time"
- "github.com/lxn/win"
-
"github.com/lxn/walk"
"golang.zx2c4.com/wireguard/windows/ringlogger"
)
@@ -21,6 +19,12 @@ const (
maxLogLinesDisplayed = 10000
)
+type LogPage struct {
+ *walk.TabPage
+ logView *walk.TableView
+ model *logModel
+}
+
func NewLogPage() (*LogPage, error) {
lp := &LogPage{}
@@ -43,7 +47,7 @@ func NewLogPage() (*LogPage, error) {
if lp.logView, err = walk.NewTableView(lp); err != nil {
return nil, err
}
- lp.logView.SetAlternatingRowBGColor(walk.Color(win.GetSysColor(win.COLOR_BTNFACE)))
+ lp.logView.SetAlternatingRowBG(true)
lp.logView.SetLastColumnStretched(true)
lp.logView.SetGridlines(true)
@@ -115,12 +119,6 @@ func NewLogPage() (*LogPage, error) {
return lp, nil
}
-type LogPage struct {
- *walk.TabPage
- logView *walk.TableView
- model *logModel
-}
-
func (lp *LogPage) isAtBottom() bool {
return len(lp.model.items) == 0 || lp.logView.ItemVisible(len(lp.model.items)-1)
}