Skip to content

Commit

Permalink
feat: Update menu items
Browse files Browse the repository at this point in the history
Break the title and version onto multiple lines, add a separator before the quit item
  • Loading branch information
danstis committed May 24, 2019
1 parent c09e1ce commit d9d7e4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ func onReady() {

// Configure the systray item
updateIcon(0, config.HighlightThreshold)
mVersion := systray.AddMenuItem(fmt.Sprintf("Toggl Weekly Tracker v%v", Version), "Version")
mTitle := systray.AddMenuItem("Toggl Weekly Tracker", "Title")
mTitle.Disable()
mVersion := systray.AddMenuItem(fmt.Sprintf("v%v", Version), "Version")
mVersion.Disable()
systray.AddSeparator()
systray.SetTitle("Toggl Weekly Time")
menuItems := make(map[int32]*systray.MenuItem)
for _, item := range config.Workspaces {
menuItems[item.ID] = systray.AddMenuItem(fmt.Sprintf("%s: %d:%02d", item.Name, 0, 0), item.Name)
}
systray.AddSeparator()
mQuit := systray.AddMenuItem("Quit", "Quit the app")
go func() {
<-mQuit.ClickedCh
Expand Down

0 comments on commit d9d7e4d

Please sign in to comment.