diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2019-05-14 18:18:06 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-15 20:11:19 +0200 |
commit | be01929f5d00456024e203bc56955105930e248c (patch) | |
tree | 89e4461bc9aba159e91396dde0b165fda74e886b /ui/updatepage.go | |
parent | ui: don't closehandle on a menu (diff) | |
download | wireguard-windows-be01929f5d00456024e203bc56955105930e248c.tar.xz wireguard-windows-be01929f5d00456024e203bc56955105930e248c.zip |
ui: fix dpi related code smells
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com>
Diffstat (limited to 'ui/updatepage.go')
-rw-r--r-- | ui/updatepage.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/updatepage.go b/ui/updatepage.go index b50427ce..fcc9a356 100644 --- a/ui/updatepage.go +++ b/ui/updatepage.go @@ -27,10 +27,8 @@ func NewUpdatePage() (*UpdatePage, error) { up.SetTitle("An Update is Available!") - iconSize := up.DPI() / 6 - tabIcon, _ := loadSystemIcon("imageres", 1, iconSize) - bitmap, _ := walk.NewBitmapFromIcon(tabIcon, walk.Size{iconSize, iconSize}) //TODO: this should use dynamic DPI - up.SetImage(bitmap) + tabIcon, _ := loadSystemIcon("imageres", 1, 16) + up.SetImage(tabIcon) up.SetLayout(walk.NewVBoxLayout()) @@ -46,7 +44,7 @@ func NewUpdatePage() (*UpdatePage, error) { bar.SetVisible(false) button, _ := walk.NewPushButton(up) - updateIcon, _ := loadSystemIcon("shell32", 46, bar.HeightPixels()) + updateIcon, _ := loadSystemIcon("shell32", 46, bar.Height()) button.SetImage(updateIcon) button.SetText("Update Now") |