WIP - doesn't quite work yet

This commit is contained in:
Drew Weymouth
2024-05-29 20:04:06 -07:00
parent a9b6d0cc2a
commit 680cfb42d2
11 changed files with 112 additions and 44 deletions
+8 -2
View File
@@ -15,7 +15,7 @@ import (
"github.com/dweymouth/supersonic/ui/util"
)
const tracklistThumbnailSize = 52
const tracklistThumbnailSize = 48
type tracklistRowBase struct {
FocusListRowBase
@@ -49,8 +49,11 @@ type tracklistRowBase struct {
}
type TracklistRow interface {
fyne.CanvasObject
FocusListRow
SetOnTappedSecondary(func(_ *fyne.PointEvent, trackNum int))
TrackID() string
Update(model *util.TrackListModel, rowNum int)
}
@@ -87,7 +90,7 @@ func NewExpandedTracklistRow(tracklist *Tracklist, im *backend.ImageManager, pla
titleArtistImg := container.NewBorder(nil, nil,
container.NewPadded(t.img) /*left*/, nil,
container.New(layout.NewCustomPaddedVBoxLayout(theme.Padding()-15),
container.New(layout.NewCustomPaddedVBoxLayout(theme.Padding()-16),
t.name, t.artist))
v := makeVerticallyCentered // func alias
@@ -138,6 +141,9 @@ func (t *tracklistRowBase) create(tracklist *Tracklist) {
t.path = util.NewTruncatingLabel()
}
func (t *tracklistRowBase) SetOnTappedSecondary(f func(*fyne.PointEvent, int)) {
t.OnTappedSecondary = f
}
func (t *tracklistRowBase) TrackID() string {
return t.trackID
}