aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2019-05-23 12:17:31 +0200
committerAlexander Neumann <alexander.neumann@picos-software.com>2019-05-23 12:19:01 +0200
commitd5542cfa862fb056d196eeda5f3fd1a85d9b7966 (patch)
treee3693bd9d0bb2b40fadcf07e7a5e11e7b009b682
parentwinipcfg: add note describing how to setup winipcfg testing environment (diff)
downloadwireguard-windows-d5542cfa862fb056d196eeda5f3fd1a85d9b7966.tar.xz
wireguard-windows-d5542cfa862fb056d196eeda5f3fd1a85d9b7966.zip
ui: fix listview painting on win 7 classic theme and high contrast themes
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com>
-rw-r--r--ui/listview.go15
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()