aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/managewindow.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-08 11:52:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-08 12:16:49 +0200
commit77b59845aca3b7bb773663aeda8094d39725d415 (patch)
treee0a3488aa1447bd741735037a9b347963b428d1d /ui/managewindow.go
parentinstaller: smarter detection of SYSTEM profile folder (diff)
downloadwireguard-windows-77b59845aca3b7bb773663aeda8094d39725d415.tar.xz
wireguard-windows-77b59845aca3b7bb773663aeda8094d39725d415.zip
ui: get correctly sized system icons
Diffstat (limited to 'ui/managewindow.go')
-rw-r--r--ui/managewindow.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/managewindow.go b/ui/managewindow.go
index 6d8c9701..5b8279d9 100644
--- a/ui/managewindow.go
+++ b/ui/managewindow.go
@@ -36,7 +36,10 @@ func NewManageTunnelsWindow() (*ManageTunnelsWindow, error) {
}
disposables.Add(mtw)
- mtw.SetIcon(iconProvider.wireguardIcon)
+ wireguardIcon, err := walk.NewIconFromResourceWithSize("$wireguard.ico", walk.Size{mtw.DPI()/3, mtw.DPI()/3}) //TODO: calculate DPI dynamically
+ if err == nil {
+ mtw.SetIcon(wireguardIcon)
+ }
mtw.SetTitle("WireGuard")
font, err := walk.NewFont("Segoe UI", 9, 0)
if err != nil {
@@ -94,7 +97,7 @@ func (mtw *ManageTunnelsWindow) Dispose() {
func (mtw *ManageTunnelsWindow) onTunnelChange(tunnel *service.Tunnel, state service.TunnelState, globalState service.TunnelState, err error) {
mtw.Synchronize(func() {
- icon, err2 := iconProvider.IconWithOverlayForState(globalState)
+ icon, err2 := iconWithOverlayForState(globalState, mtw.DPI()/3) //TODO: calculate DPI dynamically
if err2 == nil {
mtw.SetIcon(icon)
}