update app titlebar

This commit is contained in:
Drew Weymouth
2023-03-04 15:16:39 -08:00
parent 6ab7068113
commit 0a94f6844c
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -14,8 +14,9 @@ import (
)
const (
appname = "supersonic"
configFile = "config.toml"
appname = "supersonic"
displayName = "Supersonic"
configFile = "config.toml"
)
func configPath() string {
@@ -38,7 +39,7 @@ func main() {
if h <= 1 {
h = 800
}
mainWindow := ui.NewMainWindow(fyneApp, appname, myApp, fyne.NewSize(w, h))
mainWindow := ui.NewMainWindow(fyneApp, displayName, myApp, fyne.NewSize(w, h))
// TODO: There is some race condition with running this initial startup
// task immediately before showing and running the window/Fyne main loop where
+2 -1
View File
@@ -1,6 +1,7 @@
package ui
import (
"fmt"
"supersonic/backend"
"supersonic/res"
"supersonic/ui/browsing"
@@ -70,7 +71,7 @@ func NewMainWindow(fyneApp fyne.App, appName string, app *backend.App, size fyne
m.Window.SetTitle(appName)
return
}
m.Window.SetTitle(song.Title)
m.Window.SetTitle(fmt.Sprintf("%s %s · %s", song.Title, song.Artist, appName))
})
app.ServerManager.OnServerConnected(func() {
m.BrowsingPane.EnableNavigationButtons()