diff options
author | 2019-05-23 12:17:31 +0200 | |
---|---|---|
committer | 2019-05-23 12:19:01 +0200 | |
commit | e8e9c2f1294b0750eba11fbb84b71f8a67deb2b8 (patch) | |
tree | e3693bd9d0bb2b40fadcf07e7a5e11e7b009b682 | |
parent | winipcfg: add note describing how to setup winipcfg testing environment (diff) | |
download | wireguard-windows-e8e9c2f1294b0750eba11fbb84b71f8a67deb2b8.tar.xz wireguard-windows-e8e9c2f1294b0750eba11fbb84b71f8a67deb2b8.zip |
ui: fix listview painting on win 7 classic theme and high contrast themes
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | ui/listview.go | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ui/listview.go b/ui/listview.go index b99f2d99..ebdf3260 100644 --- a/ui/listview.go +++ b/ui/listview.go @@ -28,18 +28,7 @@ func (t *ListModel) RowCount() int { } func (t *ListModel) Value(row, col int) interface{} { - if row < 0 || row >= len(t.tunnels) { - return nil - } - tunnel := t.tunnels[row] - - switch col { - case 0: - return tunnel.Name - - default: - panic("unreachable col") - } + return "" } func (t *ListModel) Sort(col int, order walk.SortOrder) error { @@ -122,7 +111,7 @@ func (tv *ListView) StyleCell(style *walk.CellStyle) { b.X = b.Height b.Width -= b.Height - canvas.DrawText(tunnel.Name, tv.Font(), 0, b, walk.TextVCenter|walk.TextSingleLine) + canvas.DrawText(tunnel.Name, tv.Font(), style.TextColor, b, walk.TextVCenter|walk.TextSingleLine) //TODO: don't make an IPC call from the drawing thread like this! state, err := tunnel.State() |