Skip to content

Commit

Permalink
increase font size for artist and album on Now Playing page
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Jun 28, 2024
1 parent edf85a4 commit 90543f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ui/theme/theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const (
ColorNameHoveredIconButton fyne.ThemeColorName = "HoveredIconButton"
ColorNameNowPlayingPanel fyne.ThemeColorName = "NowPlayingPanel"

SizeNameSubText fyne.ThemeSizeName = "subText" // in between Text and Caption
SizeNameSuffixText fyne.ThemeSizeName = "suffixText" // a tiny bit smaller than subText
SizeNameSubSubHeadingText fyne.ThemeSizeName = "subSubHeadingText" // in between Text and SubHeadingText
SizeNameSubText fyne.ThemeSizeName = "subText" // in between Text and Caption
SizeNameSuffixText fyne.ThemeSizeName = "suffixText" // a tiny bit smaller than subText
)

var (
Expand Down Expand Up @@ -246,7 +247,9 @@ func (m *MyTheme) Font(style fyne.TextStyle) fyne.Resource {
}

func (m *MyTheme) Size(name fyne.ThemeSizeName) float32 {
if name == SizeNameSubText {
if name == SizeNameSubSubHeadingText {
return 15.5
} else if name == SizeNameSubText {
return 13
} else if name == SizeNameSuffixText {
return 12
Expand Down
3 changes: 2 additions & 1 deletion ui/widgets/largenowplayingcard.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ func NewLargeNowPlayingCard() *LargeNowPlayingCard {

n.trackName.Segments[0].(*widget.TextSegment).Style.SizeName = theme.SizeNameSubHeadingText
n.trackName.Truncation = fyne.TextTruncateEllipsis
n.albumName.SizeName = myTheme.SizeNameSubSubHeadingText
n.albumName.Truncation = fyne.TextTruncateEllipsis
n.trackName.Truncation = fyne.TextTruncateEllipsis
n.albumName.OnTapped = n.onAlbumNameTapped
n.artistName.OnTapped = n.onArtistNameTapped
n.artistName.SizeName = myTheme.SizeNameSubSubHeadingText

return n
}
Expand Down

0 comments on commit 90543f0

Please sign in to comment.