add stub lyrics viewer component
This commit is contained in:
@@ -32,6 +32,7 @@ type NowPlayingPage struct {
|
|||||||
|
|
||||||
queue []*mediaprovider.Track
|
queue []*mediaprovider.Track
|
||||||
queueList *widgets.PlayQueueList
|
queueList *widgets.PlayQueueList
|
||||||
|
lyricsViewer *widgets.LyricsViewer
|
||||||
imageLoadCancel context.CancelFunc
|
imageLoadCancel context.CancelFunc
|
||||||
card *widgets.LargeNowPlayingCard
|
card *widgets.LargeNowPlayingCard
|
||||||
statusLabel *widget.Label
|
statusLabel *widget.Label
|
||||||
@@ -107,6 +108,7 @@ func NewNowPlayingPage(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.lyricsViewer = widgets.NewLyricsViewer()
|
||||||
a.statusLabel = widget.NewLabel("Stopped")
|
a.statusLabel = widget.NewLabel("Stopped")
|
||||||
|
|
||||||
a.Reload()
|
a.Reload()
|
||||||
@@ -126,7 +128,7 @@ func (a *NowPlayingPage) CreateRenderer() fyne.WidgetRenderer {
|
|||||||
container.NewAppTabs(
|
container.NewAppTabs(
|
||||||
container.NewTabItem("Play Queue",
|
container.NewTabItem("Play Queue",
|
||||||
container.NewBorder(layout.NewSpacer(), nil, nil, nil, a.queueList)),
|
container.NewBorder(layout.NewSpacer(), nil, nil, nil, a.queueList)),
|
||||||
container.NewTabItem("Lyrics", layout.NewSpacer()),
|
container.NewTabItem("Lyrics", a.lyricsViewer),
|
||||||
))))
|
))))
|
||||||
a.container = container.NewStack(
|
a.container = container.NewStack(
|
||||||
mainContent,
|
mainContent,
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user