Skip to content

Commit

Permalink
with icon option added
Browse files Browse the repository at this point in the history
  • Loading branch information
ironpark committed Jul 24, 2022
1 parent ad5908f commit acaa30a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/remotray/tray.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func addMenuItem(title, tooltip string) int {
func onReady() {
defer fmt.Println("Ready For IPC")
if icon != nil && *icon != "" {
iconData, _ := base64.StdEncoding.DecodeString(*icon)
iconData, _ := base64.StdEncoding.WithPadding(base64.NoPadding).DecodeString(*icon)
systray.SetIcon(iconData)
}
if title != nil && *title != "" {
Expand All @@ -82,7 +82,7 @@ func onReady() {
ipcServer.SetMessageProcessor(internal.MsgTypeSetIcon, func(data []byte) (interface{}, error) {
var iconData string
json.Unmarshal(data, &title)
data, _ = base64.StdEncoding.DecodeString(iconData)
data, _ = base64.StdEncoding.WithPadding(base64.NoPadding).DecodeString(iconData)
systray.SetIcon(data)
return nil, nil
})
Expand Down

0 comments on commit acaa30a

Please sign in to comment.