aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-06 17:08:08 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-07 07:30:36 +0200
commit554ef2aff573cb7d471a84a11c1752694f1cb472 (patch)
treef29eb34c5ed0655386f79d4ba64411d541926b0d /ui
parentinstaller: simplify tmpfile cleanup (diff)
downloadwireguard-windows-554ef2aff573cb7d471a84a11c1752694f1cb472.tar.xz
wireguard-windows-554ef2aff573cb7d471a84a11c1752694f1cb472.zip
ui: scale icons according to DPI
Diffstat (limited to 'ui')
-rw-r--r--ui/tray.go2
-rw-r--r--ui/updatepage.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/tray.go b/ui/tray.go
index 9fbc0608..bb7250aa 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -304,7 +304,7 @@ func (tray *Tray) UpdateFound() {
action.SetText("An Update is Available!")
icon, _ := loadSystemIcon("imageres", 1)
defer icon.Dispose()
- bitmap, _ := walk.NewBitmapFromIcon(icon, walk.Size{16, 16}) //TODO: This should use dynamic DPI.
+ bitmap, _ := walk.NewBitmapFromIcon(icon, walk.Size{tray.mtw.DPI() / 6, tray.mtw.DPI() / 6}) //TODO: This should use dynamic DPI.
action.SetImage(bitmap)
action.SetDefault(true)
showUpdateTab := func() {
diff --git a/ui/updatepage.go b/ui/updatepage.go
index b5226017..8c01efe4 100644
--- a/ui/updatepage.go
+++ b/ui/updatepage.go
@@ -28,7 +28,7 @@ func NewUpdatePage() (*UpdatePage, error) {
tabIcon, _ := loadSystemIcon("imageres", 1)
defer tabIcon.Dispose()
- bitmap, _ := walk.NewBitmapFromIcon(tabIcon, walk.Size{16, 16}) //TODO: this should use dynamic DPI, but the tab widget seems broken
+ bitmap, _ := walk.NewBitmapFromIcon(tabIcon, walk.Size{up.DPI() / 6, up.DPI() / 6}) //TODO: this should use dynamic DPI
up.SetImage(bitmap)
//TODO: make title bold