From 6cefb70b18b4efab53cda023e643ac2aed67a1be Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 14 May 2019 18:18:06 +0200 Subject: ui: fix dpi related code smells Signed-off-by: Alexander Neumann Signed-off-by: Jason A. Donenfeld --- ui/updatepage.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ui/updatepage.go') 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") -- cgit v1.2.3-59-g8ed1b