mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-30 13:19:44 +02:00
fix(artist): restore artwork accents with neutral portrait fallback
This commit is contained in:
1 parent
be69ab4b80
commit
c263feb722
3 files changed
+81
-6
No files matched your search
@@ -88,7 +88,7 @@ extension _ArtistScreenSections on _ArtistScreenState {
|
||||
icon: CupertinoIcons.square_arrow_up,
|
||||
buttonSize: 50,
|
||||
iconSize: 24,
|
||||
iconColor: Colors.white,
|
||||
iconColor: colorScheme.primary,
|
||||
glassTintColor: Colors.white,
|
||||
glassTintOpacity: 0.10,
|
||||
tooltip: context.l10n.openInOtherServices,
|
||||
@@ -102,7 +102,7 @@ extension _ArtistScreenSections on _ArtistScreenState {
|
||||
CupertinoButton(
|
||||
padding: EdgeInsets.zero,
|
||||
borderRadius: BorderRadius.circular(37),
|
||||
color: Colors.white,
|
||||
color: colorScheme.primary,
|
||||
onPressed: () =>
|
||||
_showDiscographyOptions(context, colorScheme, albums),
|
||||
child: SizedBox.square(
|
||||
@@ -112,7 +112,7 @@ extension _ArtistScreenSections on _ArtistScreenState {
|
||||
child: Icon(
|
||||
CupertinoIcons.arrow_down,
|
||||
size: 34,
|
||||
color: colorScheme.surface,
|
||||
color: colorScheme.onPrimary,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -123,7 +123,7 @@ extension _ArtistScreenSections on _ArtistScreenState {
|
||||
: CupertinoIcons.star,
|
||||
buttonSize: 50,
|
||||
iconSize: 24,
|
||||
iconColor: Colors.white,
|
||||
iconColor: colorScheme.primary,
|
||||
glassTintColor: Colors.white,
|
||||
glassTintOpacity: 0.10,
|
||||
tooltip: isFavoriteArtist
|
||||
|
||||
@@ -90,16 +90,19 @@ class _MornyeArtistSurfaceState extends State<MornyeArtistSurface> {
|
||||
final logoColor = logo == null
|
||||
? null
|
||||
: CoverPalette.sourceColor(logo, Brightness.dark);
|
||||
// Keep the artwork accent for colorful portraits. A neutral
|
||||
// portrait can acquire a blue Material accent; use white there,
|
||||
// while allowing an explicit logo color to take precedence.
|
||||
final primary = widget.neutralActions
|
||||
? Colors.white
|
||||
: logoColor ?? palette.primary;
|
||||
: logoColor ?? (useAccent ? palette.primary : Colors.white);
|
||||
final primaryLuminance = primary.computeLuminance();
|
||||
final surfaceContrast =
|
||||
(primaryLuminance + 0.05) /
|
||||
(surface.computeLuminance() + 0.05);
|
||||
final onPrimary = widget.neutralActions
|
||||
? Colors.black
|
||||
: logoColor == null
|
||||
: logoColor == null && useAccent
|
||||
? palette.onPrimary
|
||||
: surfaceContrast >= 4.5
|
||||
? surface
|
||||
|
||||
Reference in new issue
Block a user