Merge branch 'main' into tooltips

This commit is contained in:
Drew Weymouth
2024-08-06 07:44:47 -07:00
committed by GitHub
10 changed files with 474 additions and 13 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader {
}
a.releaseTypeLabel = widget.NewRichText(
&widget.TextSegment{Text: lang.L("Album"), Style: util.BoldRichTextStyle},
&widget.TextSegment{Text: " by", Style: widget.RichTextStyle{Inline: true}},
&widget.TextSegment{Text: " " + lang.L("by"), Style: widget.RichTextStyle{Inline: true}},
)
a.artistLabel = widgets.NewMultiHyperlink()
a.artistLabel.OnTapped = func(id string) {
+1 -1
View File
@@ -708,7 +708,7 @@ func (c *Controller) createShareURL(id string) (*url.URL, error) {
if err != nil {
log.Printf("error creating share URL: %v", err)
c.showError(
"Failed to share content. This commonly occurs when the server does not support sharing," +
"Failed to share content. This commonly occurs when the server does not support sharing, " +
"or has the feature disabled.\nPlease check the server's settings and try again.",
)
return nil, err
+16 -4
View File
@@ -205,11 +205,23 @@ func (m *MyTheme) Icon(name fyne.ThemeIconName) fyne.Resource {
// Returns a map [themeFileName] -> displayName
func (m *MyTheme) ListThemeFiles() map[string]string {
files, _ := filepath.Glob(m.themeFileDir + "/*.toml")
// Use filepath.Join to create a cross-platform file path
pattern := filepath.Join(m.themeFileDir, "/*.toml")
files, err := filepath.Glob(pattern)
if err != nil {
log.Printf("Failed to glob files: %v", err)
}
result := make(map[string]string)
for _, filepath := range files {
if themeFile, err := ReadThemeFile(filepath); err == nil {
result[path.Base(filepath)] = themeFile.SupersonicTheme.Name
for _, filePath := range files {
// Clean the path to avoid issues with slashes
cleanPath := filepath.Clean(filePath)
// Now read the theme file, using the cleaned path
if themeFile, err := ReadThemeFile(cleanPath); err == nil {
result[filepath.Base(cleanPath)] = themeFile.SupersonicTheme.Name
} else {
log.Printf("Failed to load theme file: %s, error: %v", cleanPath, err)
}
}
return result
+1 -1
View File
@@ -193,7 +193,7 @@ func NewAlbumFilterPopup(filter *AlbumFilterButton) *AlbumFilterPopup {
title.TextStyle.Bold = true
a.container = container.NewVBox(
container.NewHBox(layout.NewSpacer(), title, layout.NewSpacer()),
container.NewHBox(widget.NewLabel(lang.L("Year from")), minYear, widget.NewLabel("to"), maxYear),
container.NewHBox(widget.NewLabel(lang.L("Year from")), minYear, widget.NewLabel(lang.L("to")), maxYear),
container.NewHBox(a.isFavorite, a.isNotFavorite),
a.genreFilter,
)