diff --git a/ui/browsing/playlistpage.go b/ui/browsing/playlistpage.go index 33d5219..4d3f732 100644 --- a/ui/browsing/playlistpage.go +++ b/ui/browsing/playlistpage.go @@ -239,13 +239,12 @@ func NewPlaylistPageHeader(page *PlaylistPage) *PlaylistPageHeader { a.ExtendBaseWidget(a) a.image = widgets.NewImagePlaceholder(myTheme.PlaylistIcon, 225) - a.titleLabel = widget.NewRichTextWithText("") - a.titleLabel.Truncation = fyne.TextTruncateEllipsis + a.titleLabel = util.NewTruncatingRichText() a.titleLabel.Segments[0].(*widget.TextSegment).Style = widget.RichTextStyle{ SizeName: theme.SizeNameHeadingText, } - a.descriptionLabel = widget.NewLabel("") - a.ownerLabel = widget.NewLabel("") + a.descriptionLabel = util.NewTruncatingLabel() + a.ownerLabel = util.NewTruncatingLabel() a.createdAtLabel = widget.NewLabel("") a.trackTimeLabel = widget.NewLabel("") a.editButton = widget.NewButtonWithIcon("Edit", theme.DocumentCreateIcon(), func() { diff --git a/ui/browsing/playlistspage.go b/ui/browsing/playlistspage.go index 72d95f6..d65cfde 100644 --- a/ui/browsing/playlistspage.go +++ b/ui/browsing/playlistspage.go @@ -429,13 +429,11 @@ type PlaylistListRow struct { func NewPlaylistListRow(layout *layouts.ColumnsLayout) *PlaylistListRow { a := &PlaylistListRow{ - nameLabel: widget.NewLabel(""), - descrptionLabel: widget.NewLabel(""), - ownerLabel: widget.NewLabel(""), - trackCountLabel: widget.NewLabel(""), + nameLabel: util.NewTruncatingLabel(), + descrptionLabel: util.NewTruncatingLabel(), + ownerLabel: util.NewTruncatingLabel(), + trackCountLabel: util.NewTrailingAlignLabel(), } - a.trackCountLabel.Alignment = fyne.TextAlignTrailing - a.ownerLabel.Truncation = fyne.TextTruncateEllipsis a.Content = container.New(layout, a.nameLabel, a.descrptionLabel, a.ownerLabel, a.trackCountLabel) a.ExtendBaseWidget(a) return a