cleanup from bad merge conflict 1: fix build errors

This commit is contained in:
Drew Weymouth
2023-05-01 17:56:13 -07:00
parent 61d8d6916a
commit 64091bb84c
4 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ func restoreGenrePage(saved *savedGenrePage) *GenrePage {
SizeName: theme.SizeNameHeadingText,
}
g.playRandom = widget.NewButtonWithIcon("Play random", myTheme.ShuffleIcon, g.playRandomSongs)
g.grid = widgets.NewAlbumGridFromState(saved.gridState)
g.grid = widgets.NewGridViewFromState(saved.gridState)
g.searcher = widgets.NewSearcher()
g.searcher.OnSearched = g.OnSearched
g.searcher.Entry.Text = saved.searchText
+1
View File
@@ -3,6 +3,7 @@ package ui
import (
"fmt"
"supersonic/backend"
"supersonic/res"
"supersonic/ui/browsing"
"supersonic/ui/controller"
"supersonic/ui/os"
+12 -7
View File
@@ -16,6 +16,17 @@ import (
const ColorNamePageBackground fyne.ThemeColorName = "PageBackground"
const (
IconNameNowPlaying fyne.ThemeIconName = "NowPlaying"
IconNameFavorite fyne.ThemeIconName = "Favorite"
IconNameNotFavorite fyne.ThemeIconName = "NotFavorite"
IconNameAlbum fyne.ThemeIconName = "Album"
IconNameArtist fyne.ThemeIconName = "Artist"
IconNameGenre fyne.ThemeIconName = "Genre"
IconNamePlaylist fyne.ThemeIconName = "Playlist"
IconNameShuffle fyne.ThemeIconName = "Shuffle"
)
type AppearanceMode string
const (
@@ -82,7 +93,6 @@ func (m *MyTheme) Color(name fyne.ThemeColorName, _ fyne.ThemeVariant) color.Col
return theme.DefaultTheme().Color(name, variant)
}
<<<<<<< HEAD
func (m *MyTheme) Icon(name fyne.ThemeIconName) fyne.Resource {
variant := m.getVariant()
switch name {
@@ -176,11 +186,6 @@ func (m MyTheme) createThemeIcons() {
ShuffleIcon = myThemedResource{myTheme: m, darkVariant: res.ResShuffleInvertSvg, lightVariant: res.ResShuffleSvg}
}
func (m MyTheme) Icon(name fyne.ThemeIconName) fyne.Resource {
return theme.DefaultTheme().Icon(name)
}
<<<<<<< HEAD
func (m *MyTheme) Font(style fyne.TextStyle) fyne.Resource {
switch style {
case fyne.TextStyle{}:
@@ -219,7 +224,7 @@ func (m *MyTheme) Size(name fyne.ThemeSizeName) float32 {
func (m *MyTheme) getVariant() fyne.ThemeVariant {
v := "Dark" // default if config has invalid or missing setting
if sharedutil.StringSliceContains(
if sharedutil.SliceContains(
[]string{string(AppearanceLight), string(AppearanceDark), string(AppearanceAuto)},
m.config.Appearance) {
v = m.config.Appearance
+1 -2
View File
@@ -4,6 +4,7 @@ import (
"fmt"
"log"
"strconv"
"sync"
"time"
"supersonic/sharedutil"
@@ -11,8 +12,6 @@ import (
"supersonic/ui/os"
myTheme "supersonic/ui/theme"
"supersonic/ui/util"
"sync"
"time"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"