diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-01 13:34:21 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-01 13:34:21 +0200 |
commit | dcb47d3bc49ad64fba753336c6e131bff18d625e (patch) | |
tree | c5e985d220a15112fdf05c84d343246f7c02a866 /ui | |
parent | ui: allow selecting all on log page (diff) | |
download | wireguard-windows-dcb47d3bc49ad64fba753336c6e131bff18d625e.tar.xz wireguard-windows-dcb47d3bc49ad64fba753336c6e131bff18d625e.zip |
ui: better tab icon dot hack
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/iconprovider.go | 6 |
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 { |