diff --git a/cmd/systray/logo.go b/cmd/systray/logo.go index cd79c94a0..ef8caca66 100644 --- a/cmd/systray/logo.go +++ b/cmd/systray/logo.go @@ -128,8 +128,14 @@ var ( // render returns a PNG image of the logo. func (logo tsLogo) render() *bytes.Buffer { - const radius = 25 const borderUnits = 1 + return logo.renderWithBorder(borderUnits) +} + +// renderWithBorder returns a PNG image of the logo with the specified border width. +// One border unit is equal to the radius of a tailscale logo dot. +func (logo tsLogo) renderWithBorder(borderUnits int) *bytes.Buffer { + const radius = 25 dim := radius * (8 + borderUnits*2) dc := gg.NewContext(dim, dim) diff --git a/cmd/systray/systray.go b/cmd/systray/systray.go index d175b55f3..a3cd19c64 100644 --- a/cmd/systray/systray.go +++ b/cmd/systray/systray.go @@ -62,7 +62,7 @@ func onReady() { // dbus wants a file path for notification icons, so copy to a temp file. appIcon, _ = os.CreateTemp("", "tailscale-systray.png") - io.Copy(appIcon, connected.render()) + io.Copy(appIcon, connected.renderWithBorder(3)) chState = make(chan ipn.State, 1)