aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/aboutdialog.go
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2019-05-14 18:18:06 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-15 20:11:19 +0200
commit6cefb70b18b4efab53cda023e643ac2aed67a1be (patch)
tree89e4461bc9aba159e91396dde0b165fda74e886b /ui/aboutdialog.go
parentui: don't closehandle on a menu (diff)
downloadwireguard-windows-6cefb70b18b4efab53cda023e643ac2aed67a1be.tar.xz
wireguard-windows-6cefb70b18b4efab53cda023e643ac2aed67a1be.zip
ui: fix dpi related code smells
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/aboutdialog.go')
-rw-r--r--ui/aboutdialog.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/aboutdialog.go b/ui/aboutdialog.go
index 1e1c3c1c..8109b159 100644
--- a/ui/aboutdialog.go
+++ b/ui/aboutdialog.go
@@ -27,7 +27,7 @@ func onAbout(owner walk.Form) {
dlg, _ := walk.NewDialogWithFixedSize(owner)
dlg.SetTitle("About WireGuard")
dlg.SetLayout(vbl)
- if icon, err := loadLogoIcon(dlg.DPI() / 3); err == nil { //TODO: calculate DPI dynamically
+ if icon, err := loadLogoIcon(32); err == nil {
dlg.SetIcon(icon)
}
@@ -40,18 +40,18 @@ func onAbout(owner walk.Form) {
if button == walk.LeftButton {
win.ShellExecute(dlg.Handle(), nil, windows.StringToUTF16Ptr("https://www.wireguard.com/"), nil, nil, win.SW_SHOWNORMAL)
} else if easterEggIndex >= 0 && button == walk.RightButton {
- if icon, err := loadSystemIcon("moricons", int32(easterEggIndex), dlg.DPI()*4/3); err == nil { //TODO: calculate DPI dynamically
+ if icon, err := loadSystemIcon("moricons", int32(easterEggIndex), 128); err == nil {
iv.SetImage(icon)
easterEggIndex++
} else {
easterEggIndex = -1
- if logo, err := loadLogoIcon(dlg.DPI() * 4 / 3); err == nil { //TODO: calculate DPI dynamically
+ if logo, err := loadLogoIcon(128); err == nil {
iv.SetImage(logo)
}
}
}
})
- if logo, err := loadLogoIcon(dlg.DPI() * 4 / 3); err == nil { //TODO: calculate DPI dynamically
+ if logo, err := loadLogoIcon(128); err == nil {
iv.SetImage(logo)
}