@@ -21,25 +21,35 @@ class YaruMusicPodApp extends StatelessWidget with WatchItMixin {
2121 final customThemeColor = watchPropertyValue (
2222 (SettingsModel m) => m.customThemeColor,
2323 );
24+
25+ final usePlayerColor = watchPropertyValue (
26+ (SettingsModel m) => m.usePlayerColor,
27+ );
28+ final playerColor = watchPropertyValue ((PlayerModel m) => m.color);
29+
2430 final useYaruTheme = watchPropertyValue (
2531 (SettingsModel m) => m.useYaruTheme,
2632 );
2733
2834 return YaruTheme (
2935 builder: (context, yaru, child) {
30- final yaruLightFlavor = useCustomThemeColor && customThemeColor != null
31- ? createYaruLightTheme (primaryColor: Color (customThemeColor))
36+ final color = playerColor != null && usePlayerColor
37+ ? playerColor
38+ : (customThemeColor != null && useCustomThemeColor
39+ ? Color (customThemeColor)
40+ : yaru.theme? .colorScheme.primary);
41+
42+ final yaruLightFlavor = color != null
43+ ? createYaruLightTheme (primaryColor: color)
3244 : yaru.theme;
33- final yaruDarkFlavor = useCustomThemeColor && customThemeColor != null
34- ? createYaruDarkTheme (primaryColor: Color (customThemeColor) )
45+ final yaruDarkFlavor = color != null
46+ ? createYaruDarkTheme (primaryColor: color )
3547 : yaru.darkTheme;
3648
3749 return DesktopMusicPodApp (
3850 highContrastTheme: yaruHighContrastLight,
3951 highContrastDarkTheme: yaruHighContrastDark,
40- accent: customThemeColor != null && useCustomThemeColor
41- ? Color (customThemeColor)
42- : yaru.theme? .colorScheme.primary,
52+ accent: color,
4353 lightTheme: useYaruTheme
4454 ? yaruLightWithTweaks (yaruLightFlavor)
4555 : null ,
0 commit comments