Updates #116: add tool tips to buttons and various UI elements

This commit is contained in:
Drew Weymouth
2024-08-03 08:25:38 -07:00
parent 7fcbfdd456
commit 7c94a4c694
12 changed files with 137 additions and 44 deletions
+3
View File
@@ -14,6 +14,7 @@ import (
"sync"
"time"
fynetooltip "github.com/dweymouth/fyne-tooltip"
"github.com/dweymouth/supersonic/backend"
"github.com/dweymouth/supersonic/backend/mediaprovider"
"github.com/dweymouth/supersonic/backend/player"
@@ -528,8 +529,10 @@ func (c *Controller) ShowSettingsDialog(themeUpdateCallbk func(), themeFiles map
}
dlg.OnPageNeedsRefresh = c.RefreshPageFunc
pop := widget.NewModalPopUp(dlg, c.MainWindow.Canvas())
fynetooltip.AddPopUpToolTipLayer(pop)
dlg.OnDismiss = func() {
pop.Hide()
fynetooltip.DestroyPopUpToolTipLayer(pop)
c.doModalClosed()
c.App.SaveConfigFile()
}
+31
View File
@@ -18,6 +18,37 @@ const (
Radios
)
func (p PageName) String() string {
switch p {
case Album:
return "Album"
case Albums:
return "Albums"
case Artist:
return "Artist"
case Artists:
return "Artists"
case Genre:
return "Genre"
case Genres:
return "Genres"
case Favorites:
return "Favorites"
case NowPlaying:
return "Now Playing"
case Playlist:
return "Playlist"
case Playlists:
return "Playlists"
case Tracks:
return "All Tracks"
case Radios:
return "Internet Radio Stations"
default:
return ""
}
}
type Route struct {
Page PageName
Arg string