From 90543f0248423c8d36b4c698fd31ba34e048cd6d Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Fri, 28 Jun 2024 07:53:23 -0700 Subject: [PATCH] increase font size for artist and album on Now Playing page --- ui/theme/theme.go | 9 ++++++--- ui/widgets/largenowplayingcard.go | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/theme/theme.go b/ui/theme/theme.go index 6738f7cf..33d38bbb 100644 --- a/ui/theme/theme.go +++ b/ui/theme/theme.go @@ -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 ( @@ -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 diff --git a/ui/widgets/largenowplayingcard.go b/ui/widgets/largenowplayingcard.go index 5a7ecd21..8035b122 100644 --- a/ui/widgets/largenowplayingcard.go +++ b/ui/widgets/largenowplayingcard.go @@ -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 }