Updates #116: add tool tips to buttons and various UI elements
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user