aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/confview.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-04-28 08:56:26 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-28 08:57:29 +0200
commit4639ad6d7de28d88099b64c480dfd2dbc39089e3 (patch)
tree4e634f23a1e2aff003e0943ce759210c7e82efde /ui/confview.go
parentbuild: backport security attributes helper from 1.13 (diff)
downloadwireguard-windows-4639ad6d7de28d88099b64c480dfd2dbc39089e3.tar.xz
wireguard-windows-4639ad6d7de28d88099b64c480dfd2dbc39089e3.zip
ui: partially fix dot placement
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui/confview.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/confview.go b/ui/confview.go
index 09f0111b..6adfdb83 100644
--- a/ui/confview.go
+++ b/ui/confview.go
@@ -16,8 +16,6 @@ import (
"golang.zx2c4.com/wireguard/windows/service"
)
-const statusImageSize = 19
-
type widgetsLine interface {
widgets() (walk.Widget, walk.Widget)
}
@@ -80,7 +78,7 @@ func (lsl *labelStatusLine) widgets() (walk.Widget, walk.Widget) {
}
func (lsl *labelStatusLine) update(state service.TunnelState) {
- img, err := iconProvider.ImageForState(state, walk.Size{statusImageSize, statusImageSize})
+ img, err := iconProvider.ImageForState(state, walk.Rectangle{-4, -4, lsl.label.SizeHint().Height*3/4 + 4, lsl.label.SizeHint().Height*3/4 + 4})
if err == nil {
lsl.statusImage.SetImage(img)
}
@@ -117,6 +115,8 @@ func newLabelStatusLine(parent walk.Container) *labelStatusLine {
lsl.statusComposite.SetLayout(layout)
lsl.statusImage, _ = walk.NewImageView(lsl.statusComposite)
+ lsl.statusImage.SetMode(walk.ImageViewModeIdeal)
+
lsl.statusLabel, _ = walk.NewLineEdit(lsl.statusComposite)
win.SetWindowLong(lsl.statusLabel.Handle(), win.GWL_EXSTYLE, win.GetWindowLong(lsl.statusLabel.Handle(), win.GWL_EXSTYLE)&^win.WS_EX_CLIENTEDGE)
lsl.statusLabel.SetReadOnly(true)