begin reuse of widgets across pages
This commit is contained in:
@@ -62,14 +62,16 @@ func NewNowPlayingPage(
|
||||
a.tracklist.OnVisibleColumnsChanged = func(cols []string) {
|
||||
a.conf.TracklistColumns = cols
|
||||
}
|
||||
a.tracklist.AutoNumber = true
|
||||
a.tracklist.DisablePlaybackMenu = true
|
||||
a.tracklist.Options = widgets.TracklistOptions{
|
||||
AutoNumber: true,
|
||||
DisablePlaybackMenu: true,
|
||||
AuxiliaryMenuItems: []*fyne.MenuItem{
|
||||
fyne.NewMenuItem("Remove from queue", a.onRemoveSelectedFromQueue),
|
||||
},
|
||||
}
|
||||
contr.ConnectTracklistActions(a.tracklist)
|
||||
// override the default OnPlayTrackAt handler b/c we don't need to re-load the tracks into the queue
|
||||
a.tracklist.OnPlayTrackAt = a.onPlayTrackAt
|
||||
a.tracklist.AuxiliaryMenuItems = []*fyne.MenuItem{
|
||||
fyne.NewMenuItem("Remove from queue", a.onRemoveSelectedFromQueue),
|
||||
}
|
||||
a.title = widget.NewRichTextWithText("Now Playing")
|
||||
a.title.Segments[0].(*widget.TextSegment).Style.SizeName = widget.RichTextStyleHeading.SizeName
|
||||
a.statusLabel = widget.NewRichTextWithText("Stopped")
|
||||
|
||||
Reference in New Issue
Block a user