add stub lyrics viewer component

This commit is contained in:
Drew Weymouth
2024-03-03 13:51:54 -08:00
parent eaef666b0c
commit e9142f9ebf
2 changed files with 18 additions and 1 deletions
+3 -1
View File
@@ -32,6 +32,7 @@ type NowPlayingPage struct {
queue []*mediaprovider.Track
queueList *widgets.PlayQueueList
lyricsViewer *widgets.LyricsViewer
imageLoadCancel context.CancelFunc
card *widgets.LargeNowPlayingCard
statusLabel *widget.Label
@@ -107,6 +108,7 @@ func NewNowPlayingPage(
}
}
a.lyricsViewer = widgets.NewLyricsViewer()
a.statusLabel = widget.NewLabel("Stopped")
a.Reload()
@@ -126,7 +128,7 @@ func (a *NowPlayingPage) CreateRenderer() fyne.WidgetRenderer {
container.NewAppTabs(
container.NewTabItem("Play Queue",
container.NewBorder(layout.NewSpacer(), nil, nil, nil, a.queueList)),
container.NewTabItem("Lyrics", layout.NewSpacer()),
container.NewTabItem("Lyrics", a.lyricsViewer),
))))
a.container = container.NewStack(
mainContent,
+15
View File
@@ -0,0 +1,15 @@
package widgets
import "fyne.io/fyne/v2/widget"
type LyricsViewer struct {
widget.Label
}
func NewLyricsViewer() *LyricsViewer {
l := &LyricsViewer{Label: widget.Label{
Text: "Lyrics not available",
}}
l.ExtendBaseWidget(l)
return l
}