aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/tray.go
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2019-04-23 17:37:10 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-23 17:43:47 +0200
commit592e099ad6eef58e4f9580850a547718d4ffa6ce (patch)
tree1355594787f5827bd7035a9e2b5ec341a5ce60f4 /ui/tray.go
parentui: remove nag and fix up strings (diff)
downloadwireguard-windows-592e099ad6eef58e4f9580850a547718d4ffa6ce.tar.xz
wireguard-windows-592e099ad6eef58e4f9580850a547718d4ffa6ce.zip
ui: overlay main window and tray icons according to tunnel status
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/tray.go')
-rw-r--r--ui/tray.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/tray.go b/ui/tray.go
index c9091211..e15d2549 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -148,6 +148,10 @@ func (tray *Tray) SetTunnelState(tunnel *service.Tunnel, state service.TunnelSta
}
func (tray *Tray) SetTunnelStateWithNotification(tunnel *service.Tunnel, state service.TunnelState, showNotifications bool) {
+ if icon, err := tray.mtw.tunnelsView.imageProvider.IconWithOverlayForState(tray.icon, state); err == nil {
+ tray.SetIcon(icon)
+ }
+
tunnelAction := tray.tunnels[tunnel.Name]
actions := tray.ContextMenu().Actions()