aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/iconprovider.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-01 13:34:21 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-01 13:34:21 +0200
commitb9ce02444bbb8bf4017c0019621892a5be9e4117 (patch)
treec5e985d220a15112fdf05c84d343246f7c02a866 /ui/iconprovider.go
parentui: allow selecting all on log page (diff)
downloadwireguard-windows-b9ce02444bbb8bf4017c0019621892a5be9e4117.tar.xz
wireguard-windows-b9ce02444bbb8bf4017c0019621892a5be9e4117.zip
ui: better tab icon dot hack
Diffstat (limited to '')
-rw-r--r--ui/iconprovider.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/iconprovider.go b/ui/iconprovider.go
index 02dcebed..6d7e77bc 100644
--- a/ui/iconprovider.go
+++ b/ui/iconprovider.go
@@ -240,7 +240,11 @@ func (tsip *IconProvider) drawUpdateAvailableImage(size int) (*walk.Bitmap, erro
}
defer canvas.Dispose()
- margin := 2 // This should be scaled for DPI but isn't, because of walk bug.
+ // This should be scaled for DPI but instead we do the opposite, due to a walk bug.
+ margin := int(3.0 - (tsip.scale - 1.0) * 3.0)
+ if margin < 0 {
+ margin = 0
+ }
rect := walk.Rectangle{margin, margin, size - margin*2, size - margin*2}
if err := canvas.FillEllipse(updateAvailableBrush, rect); err != nil {