diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-08 11:52:18 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-08 12:16:49 +0200 |
commit | 77b59845aca3b7bb773663aeda8094d39725d415 (patch) | |
tree | e0a3488aa1447bd741735037a9b347963b428d1d /ui/updatepage.go | |
parent | installer: smarter detection of SYSTEM profile folder (diff) | |
download | wireguard-windows-77b59845aca3b7bb773663aeda8094d39725d415.tar.xz wireguard-windows-77b59845aca3b7bb773663aeda8094d39725d415.zip |
ui: get correctly sized system icons
Diffstat (limited to '')
-rw-r--r-- | ui/updatepage.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/updatepage.go b/ui/updatepage.go index 8c01efe4..a5471e9f 100644 --- a/ui/updatepage.go +++ b/ui/updatepage.go @@ -26,9 +26,10 @@ func NewUpdatePage() (*UpdatePage, error) { up.SetTitle("An Update is Available!") - tabIcon, _ := loadSystemIcon("imageres", 1) + iconSize := up.DPI() / 6 + tabIcon, _ := loadSystemIcon("imageres", 1, iconSize) defer tabIcon.Dispose() - bitmap, _ := walk.NewBitmapFromIcon(tabIcon, walk.Size{up.DPI() / 6, up.DPI() / 6}) //TODO: this should use dynamic DPI + bitmap, _ := walk.NewBitmapFromIcon(tabIcon, walk.Size{iconSize, iconSize}) //TODO: this should use dynamic DPI up.SetImage(bitmap) //TODO: make title bold @@ -46,8 +47,8 @@ func NewUpdatePage() (*UpdatePage, error) { bar.SetVisible(false) button, _ := walk.NewPushButton(up) - updateIcon, _ := loadSystemIcon("shell32", 46) - button.SetImage(updateIcon) //TODO: the placement of this looks sort of weird + updateIcon, _ := loadSystemIcon("shell32", 46, bar.HeightPixels()) + button.SetImage(updateIcon) button.SetText("Update Now") walk.NewVSpacer(up) |