A cross platform Audiobookshelf client for Android and iOS
Dart
Add a button background setting to make the player card buttons clear, subtle or solid
Barnabas5b7dd6d1a46b
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arbindex 7601247e..87a17bf9 100644--- a/lib/l10n/app_en.arb+++ b/lib/l10n/app_en.arb@@ -5083,5 +5083,10 @@"carDisconnectRewindOff": "Off","carDisconnectRewindValue": "{seconds} seconds","@carDisconnectRewindValue": { "placeholders": { "seconds": { "type": "int" } } },- "carDisconnectRewindInfo": "When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected."+ "carDisconnectRewindInfo": "When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.",+ "cardButtonFill": "Button background",+ "cardButtonFillSubtitle": "How the buttons on the player card are filled",+ "cardButtonFillClear": "Clear",+ "cardButtonFillSubtle": "Subtle",+ "cardButtonFillSolid": "Solid"}diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dartindex 2395502b..af68a8aa 100644--- a/lib/l10n/app_localizations.dart+++ b/lib/l10n/app_localizations.dart@@ -15674,6 +15674,36 @@ abstract class AppLocalizations {/// In en, this message translates to:/// **'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.'**String get carDisconnectRewindInfo;++ /// No description provided for @cardButtonFill.+ ///+ /// In en, this message translates to:+ /// **'Button background'**+ String get cardButtonFill;++ /// No description provided for @cardButtonFillSubtitle.+ ///+ /// In en, this message translates to:+ /// **'How the buttons on the player card are filled'**+ String get cardButtonFillSubtitle;++ /// No description provided for @cardButtonFillClear.+ ///+ /// In en, this message translates to:+ /// **'Clear'**+ String get cardButtonFillClear;++ /// No description provided for @cardButtonFillSubtle.+ ///+ /// In en, this message translates to:+ /// **'Subtle'**+ String get cardButtonFillSubtle;++ /// No description provided for @cardButtonFillSolid.+ ///+ /// In en, this message translates to:+ /// **'Solid'**+ String get cardButtonFillSolid;}class _AppLocalizationsDelegatediff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dartindex 20262694..f8467eb4 100644--- a/lib/l10n/app_localizations_de.dart+++ b/lib/l10n/app_localizations_de.dart@@ -9219,4 +9219,20 @@ class AppLocalizationsDe extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dartindex df4d8cfa..f0f30dc0 100644--- a/lib/l10n/app_localizations_el.dart+++ b/lib/l10n/app_localizations_el.dart@@ -9098,4 +9098,20 @@ class AppLocalizationsEl extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dartindex a10e5cd6..c1712075 100644--- a/lib/l10n/app_localizations_en.dart+++ b/lib/l10n/app_localizations_en.dart@@ -9098,4 +9098,20 @@ class AppLocalizationsEn extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dartindex e6d0318f..ec7d97e2 100644--- a/lib/l10n/app_localizations_es.dart+++ b/lib/l10n/app_localizations_es.dart@@ -9100,4 +9100,20 @@ class AppLocalizationsEs extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dartindex e0806d5e..6c7ff9ce 100644--- a/lib/l10n/app_localizations_fr.dart+++ b/lib/l10n/app_localizations_fr.dart@@ -9151,4 +9151,20 @@ class AppLocalizationsFr extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dartindex 5ff11957..075cdbc6 100644--- a/lib/l10n/app_localizations_it.dart+++ b/lib/l10n/app_localizations_it.dart@@ -9098,4 +9098,20 @@ class AppLocalizationsIt extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dartindex 9b888532..f88b9c5c 100644--- a/lib/l10n/app_localizations_ja.dart+++ b/lib/l10n/app_localizations_ja.dart@@ -9098,4 +9098,20 @@ class AppLocalizationsJa extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dartindex 64f26f5d..1f5e86d0 100644--- a/lib/l10n/app_localizations_no.dart+++ b/lib/l10n/app_localizations_no.dart@@ -9098,4 +9098,20 @@ class AppLocalizationsNo extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dartindex ad41def1..628805fc 100644--- a/lib/l10n/app_localizations_pt.dart+++ b/lib/l10n/app_localizations_pt.dart@@ -9098,4 +9098,20 @@ class AppLocalizationsPt extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dartindex 31c2a756..57e6a969 100644--- a/lib/l10n/app_localizations_ro.dart+++ b/lib/l10n/app_localizations_ro.dart@@ -9098,4 +9098,20 @@ class AppLocalizationsRo extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dartindex d1be1190..d812327e 100644--- a/lib/l10n/app_localizations_ru.dart+++ b/lib/l10n/app_localizations_ru.dart@@ -9103,4 +9103,20 @@ class AppLocalizationsRu extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dartindex 3b47856a..25c6b32b 100644--- a/lib/l10n/app_localizations_zh.dart+++ b/lib/l10n/app_localizations_zh.dart@@ -9006,4 +9006,20 @@ class AppLocalizationsZh extends AppLocalizations {@overrideString get carDisconnectRewindInfo =>'When the car is turned off without pausing first, the phone can take a few seconds to notice that Android Auto or CarPlay has disconnected, and playback continues until it does. This rewinds by the amount set here so nothing is missed. Time how long your car takes to pause after it is turned off and use that. Nothing happens if playback was already paused when the car disconnected.';++ @override+ String get cardButtonFill => 'Button background';++ @override+ String get cardButtonFillSubtitle =>+ 'How the buttons on the player card are filled';++ @override+ String get cardButtonFillClear => 'Clear';++ @override+ String get cardButtonFillSubtle => 'Subtle';++ @override+ String get cardButtonFillSolid => 'Solid';}diff --git a/lib/main.dart b/lib/main.dartindex d08d3cb1..00994ebb 100644--- a/lib/main.dart+++ b/lib/main.dart@@ -242,6 +242,7 @@ void main() async {PlayerSettings.showEbookBadge = await PlayerSettings.getShowEbookBadge();PlayerSettings.mp3IndexSeeking = await PlayerSettings.getMp3IndexSeeking();PlayerSettings.coverSize = await PlayerSettings.getCoverSize();+ PlayerSettings.cardButtonFill = await PlayerSettings.getCardButtonFill();// Restore last cover seed color so the theme doesn't flash on startup{final seedInt = await PlayerSettings.getCoverSeedColor();@@ -720,6 +721,7 @@ class _AuthGateState extends State<AuthGate> {PlayerSettings.showEbookBadge = await PlayerSettings.getShowEbookBadge();PlayerSettings.mp3IndexSeeking = await PlayerSettings.getMp3IndexSeeking();PlayerSettings.coverSize = await PlayerSettings.getCoverSize();+ PlayerSettings.cardButtonFill = await PlayerSettings.getCardButtonFill();// Rotation lock: main() applied it before scope was active, so that pass// read the never-written unscoped key and always came up unlocked. The// timeout matters: on a headless boot (Android Auto bind) there is nodiff --git a/lib/providers/auth_provider.dart b/lib/providers/auth_provider.dartindex 62381874..013fcc89 100644--- a/lib/providers/auth_provider.dart+++ b/lib/providers/auth_provider.dart@@ -1313,6 +1313,7 @@ class AuthProvider extends ChangeNotifier {PlayerSettings.showEbookBadge = await PlayerSettings.getShowEbookBadge();PlayerSettings.mp3IndexSeeking = await PlayerSettings.getMp3IndexSeeking();PlayerSettings.coverSize = await PlayerSettings.getCoverSize();+ PlayerSettings.cardButtonFill = await PlayerSettings.getCardButtonFill();// Reload EQ settings from the new account's scope. Without this the// EqualizerService singleton keeps the previous account's in-memorydiff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dartindex ba666f18..3002ca87 100644--- a/lib/screens/settings_screen.dart+++ b/lib/screens/settings_screen.dart@@ -158,6 +158,7 @@ class _SettingsScreenState extends State<SettingsScreen> {bool _rectangleCovers = false;bool _showSubtitles = false;String _coverSize = 'medium';+ String _cardButtonFill = 'subtle';// Per-library overrides shown in the Library section, scoped to whichever// library is currently selected (scales to accounts with many libraries -// no giant list, just "whatever you're browsing right now").@@ -1000,6 +1001,7 @@ class _SettingsScreenState extends State<SettingsScreen> {final progressScale = results.last as double;final mp3IndexSeek = await PlayerSettings.getMp3IndexSeeking();final coverSize = await PlayerSettings.getCoverSize();+ final cardButtonFill = await PlayerSettings.getCardButtonFill();final flatBackground = await PlayerSettings.getFlatBackground();final showSubtitles = await PlayerSettings.getShowSubtitles();final showEbookBadge = await PlayerSettings.getShowEbookBadge();@@ -1162,6 +1164,7 @@ class _SettingsScreenState extends State<SettingsScreen> {_rectangleCovers = rectCovers;_showSubtitles = showSubtitles;_coverSize = coverSize;+ _cardButtonFill = cardButtonFill;_coverPlayButton = coverPlay;_cardBackground = cardBg;_progressTextScale = progressScale;@@ -2134,6 +2137,42 @@ class _SettingsScreenState extends State<SettingsScreen> {),),const Divider(height: 1, indent: 16, endIndent: 16),+ Padding(+ padding: const EdgeInsets.fromLTRB(16, 12, 16, 12),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(l.cardButtonFill, style: tt.titleSmall),+ const SizedBox(height: 4),+ Text(+ l.cardButtonFillSubtitle,+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant),+ ),+ const SizedBox(height: 12),+ SizedBox(+ width: double.infinity,+ child: SegmentedButton<String>(+ showSelectedIcon: false,+ segments: [+ ButtonSegment(value: 'clear', label: FittedBox(fit: BoxFit.scaleDown, child: Text(l.cardButtonFillClear, maxLines: 1))),+ ButtonSegment(value: 'subtle', label: FittedBox(fit: BoxFit.scaleDown, child: Text(l.cardButtonFillSubtle, maxLines: 1))),+ ButtonSegment(value: 'solid', label: FittedBox(fit: BoxFit.scaleDown, child: Text(l.cardButtonFillSolid, maxLines: 1))),+ ],+ selected: {_cardButtonFill},+ onSelectionChanged: _loaded ? (selected) {+ final v = selected.first;+ setState(() => _cardButtonFill = v);+ PlayerSettings.setCardButtonFill(v);+ } : null,+ style: const ButtonStyle(+ visualDensity: VisualDensity.compact,+ ),+ ),+ ),+ ],+ ),+ ),+ const Divider(height: 1, indent: 16, endIndent: 16),SwitchListTile(title: const Text('Classic wording'),subtitle: Text(diff --git a/lib/screens/settings_search_index.dart b/lib/screens/settings_search_index.dartindex ca40b3be..761ba278 100644--- a/lib/screens/settings_search_index.dart+++ b/lib/screens/settings_search_index.dart@@ -29,6 +29,7 @@ List<SettingSearchEntry> settingsSearchEntries(BuildContext context) {SettingSearchEntry('Appearance', l.sectionAppearance, l.showSubtitles, [l.showSubtitlesOnSubtitle, l.showSubtitlesOffSubtitle]),SettingSearchEntry('Appearance', l.sectionAppearance, l.rectangleBookCovers, [l.rectangleBookCoversOnSubtitle, l.rectangleBookCoversOffSubtitle]),SettingSearchEntry('Appearance', l.sectionAppearance, l.coverSize, [l.coverSizeSubtitle, l.coverSizeSmall, l.coverSizeMedium, l.coverSizeLarge]),+ SettingSearchEntry('Appearance', l.sectionAppearance, l.cardButtonFill, [l.cardButtonFillSubtitle, l.cardButtonFillClear, l.cardButtonFillSubtle, l.cardButtonFillSolid]),SettingSearchEntry('Appearance', l.sectionAppearance, 'Classic wording', const ['Using "Play", "Now Playing", "Finished"', 'Using "Absorb", "Absorbing", "Fully Absorbed"']),if (!(Platform.isIOS && MediaQuery.sizeOf(context).shortestSide >= 600))SettingSearchEntry('Appearance', l.sectionAppearance, 'Lock rotation', const ['Screen stays in portrait', 'Screen can rotate with the device']),diff --git a/lib/services/backup_service.dart b/lib/services/backup_service.dartindex 0c99b4df..7c7a95ff 100644--- a/lib/services/backup_service.dart+++ b/lib/services/backup_service.dart@@ -94,6 +94,7 @@ class BackupService {'cardMoreInline': await PlayerSettings.getCardMoreInline(),'rectangleCovers': await PlayerSettings.getRectangleCovers(),'coverSize': await PlayerSettings.getCoverSize(),+ 'cardButtonFill': await PlayerSettings.getCardButtonFill(),'coverPlayButton': await PlayerSettings.getCoverPlayButton(),'whenFinished': await PlayerSettings.getWhenFinished(),'sleepRewindSeconds': await PlayerSettings.getSleepRewindSeconds(),@@ -618,6 +619,7 @@ class BackupService {if (s['cardMoreInline'] != null) PlayerSettings.setCardMoreInline(s['cardMoreInline'] as bool);if (s['rectangleCovers'] != null) PlayerSettings.setRectangleCovers(s['rectangleCovers'] as bool);if (s['coverSize'] != null) PlayerSettings.setCoverSize(s['coverSize'] as String);+ if (s['cardButtonFill'] != null) PlayerSettings.setCardButtonFill(s['cardButtonFill'] as String);if (s['coverPlayButton'] != null) PlayerSettings.setCoverPlayButton(s['coverPlayButton'] as bool);if (s['sleepRewindSeconds'] != null) PlayerSettings.setSleepRewindSeconds(s['sleepRewindSeconds'] as int);if (s['sleepTimerTab'] != null) PlayerSettings.setSleepTimerTab(s['sleepTimerTab'] as int);diff --git a/lib/services/player_settings.dart b/lib/services/player_settings.dartindex c5baac3d..2b927363 100644--- a/lib/services/player_settings.dart+++ b/lib/services/player_settings.dart@@ -1105,6 +1105,15 @@ class PlayerSettings {static Future<bool> getRectangleCovers() => _get('rectangleCovers', false);static Future<void> setRectangleCovers(bool value) => _set('rectangleCovers', value, notify: true);+ /// How the player card's buttons are filled: 'clear' (no fill or edge),+ /// 'subtle' (the long-standing look) or 'solid'. Cached for builders.+ static String cardButtonFill = 'subtle';+ static Future<String> getCardButtonFill() => _get('cardButtonFill', 'subtle');+ static Future<void> setCardButtonFill(String value) async {+ cardButtonFill = value;+ await _set('cardButtonFill', value, notify: true);+ }+/// Cached value for synchronous access in grid builders./// 'small' | 'medium' | 'large'; medium keeps the long-standing layout.static String coverSize = 'medium';diff --git a/lib/widgets/card_buttons.dart b/lib/widgets/card_buttons.dartindex 346c69f7..4df1961d 100644--- a/lib/widgets/card_buttons.dart+++ b/lib/widgets/card_buttons.dart@@ -46,6 +46,21 @@ Color _inkAccent(Color accent) =>double _inkAlpha(double normal, double eink) =>PlayerSettings.einkMode ? eink : normal;+/// A card button's fill under the Button background setting. Subtle is the+/// tint at the given strength; Solid lays it over an opaque surface.+Color _buttonFill(ColorScheme cs, Color tint, double normal, double eink, {bool neutral = false}) =>+ switch (PlayerSettings.cardButtonFill) {+ 'clear' => Colors.transparent,+ 'solid' => neutral+ ? cs.surfaceContainerHighest+ : Color.alphaBlend(tint.withValues(alpha: 0.2), cs.surfaceContainerHighest),+ _ => tint.withValues(alpha: _inkAlpha(normal, eink)),+ };++/// A card button's edge; Clear drops it with the fill.+Color _buttonEdge(Color tint, double normal, double eink) =>+ PlayerSettings.cardButtonFill == 'clear' ? Colors.transparent : tint.withValues(alpha: _inkAlpha(normal, eink));+/// Wrapper that gives any child a press-down opacity+scale effect.class Pressable extends StatefulWidget {final VoidCallback? onTap;@@ -152,13 +167,13 @@ class CardWideButton extends StatelessWidget {padding: EdgeInsets.symmetric(vertical: vPad),decoration: BoxDecoration(color: highlighted- ? _inkAccent(accent).withValues(alpha: _inkAlpha(0.1, 0.12))- : cs.onSurface.withValues(alpha: _inkAlpha(0.06, 0.03)),+ ? _buttonFill(cs, _inkAccent(accent), 0.1, 0.12)+ : _buttonFill(cs, cs.onSurface, 0.06, 0.03, neutral: true),borderRadius: BorderRadius.circular(radius),border: Border.all(color: highlighted- ? _inkAccent(accent).withValues(alpha: _inkAlpha(0.3, 1.0))- : cs.onSurface.withValues(alpha: _inkAlpha(0.08, 0.55))),+ ? _buttonEdge(_inkAccent(accent), 0.3, 1.0)+ : _buttonEdge(cs.onSurface, 0.08, 0.55)),),child: showIconOnly? Center(child: Icon(icon, size: iconSize, color: fgColor))@@ -269,12 +284,12 @@ class CardSleepButtonInline extends StatelessWidget {clipBehavior: Clip.antiAlias,decoration: BoxDecoration(color: active- ? _inkAccent(accent).withValues(alpha: _inkAlpha(0.1, 0.12))- : cs.onSurface.withValues(alpha: _inkAlpha(0.06, 0.03)),+ ? _buttonFill(cs, _inkAccent(accent), 0.1, 0.12)+ : _buttonFill(cs, cs.onSurface, 0.06, 0.03, neutral: true),borderRadius: BorderRadius.circular(radius),border: Border.all(color: active- ? _inkAccent(accent).withValues(alpha: _inkAlpha(0.3, 1.0))- : cs.onSurface.withValues(alpha: _inkAlpha(0.08, 0.55))),+ ? _buttonEdge(_inkAccent(accent), 0.3, 1.0)+ : _buttonEdge(cs.onSurface, 0.08, 0.55)),),child: Stack(children: [if (active && isTime)@@ -378,12 +393,12 @@ class CardDownloadButtonInline extends StatelessWidget {clipBehavior: Clip.antiAlias,decoration: BoxDecoration(color: downloaded- ? dlGreen.withValues(alpha: _inkAlpha(0.1, 0.12))- : cs.onSurface.withValues(alpha: _inkAlpha(0.06, 0.03)),+ ? _buttonFill(cs, dlGreen, 0.1, 0.12)+ : _buttonFill(cs, cs.onSurface, 0.06, 0.03, neutral: true),borderRadius: BorderRadius.circular(radius),border: Border.all(color: downloaded- ? dlGreen.withValues(alpha: _inkAlpha(0.3, 0.9))- : cs.onSurface.withValues(alpha: _inkAlpha(0.08, 0.55))),+ ? _buttonEdge(dlGreen, 0.3, 0.9)+ : _buttonEdge(cs.onSurface, 0.08, 0.55)),),child: Stack(children: [if (downloading)@@ -508,9 +523,9 @@ class _CardBookmarkButtonInlineState extends State<CardBookmarkButtonInline> {child: Container(padding: EdgeInsets.symmetric(vertical: vPad),decoration: BoxDecoration(- color: cs.onSurface.withValues(alpha: _inkAlpha(0.06, 0.03)),+ color: _buttonFill(cs, cs.onSurface, 0.06, 0.03, neutral: true),borderRadius: BorderRadius.circular(radius),- border: Border.all(color: cs.onSurface.withValues(alpha: _inkAlpha(0.08, 0.55))),+ border: Border.all(color: _buttonEdge(cs.onSurface, 0.08, 0.55)),),child: cp || widget.iconsOnly? Center(child: Icon(Icons.bookmark_outline_rounded, size: iconSz, color: cs.onSurfaceVariant))@@ -644,9 +659,9 @@ class _CardSpeedButtonInlineState extends State<CardSpeedButtonInline> {child: Container(height: h,decoration: BoxDecoration(- color: cs.onSurface.withValues(alpha: _inkAlpha(0.06, 0.03)),+ color: _buttonFill(cs, cs.onSurface, 0.06, 0.03, neutral: true),borderRadius: BorderRadius.circular(radius),- border: Border.all(color: cs.onSurface.withValues(alpha: _inkAlpha(0.08, 0.55))),+ border: Border.all(color: _buttonEdge(cs.onSurface, 0.08, 0.55)),),child: content,),@@ -1735,12 +1750,12 @@ class CardActionDelegate {padding: EdgeInsets.symmetric(vertical: vPad),decoration: BoxDecoration(color: castActive- ? _inkAccent(accent).withValues(alpha: _inkAlpha(0.1, 0.12))- : cs.onSurface.withValues(alpha: _inkAlpha(0.06, 0.03)),+ ? _buttonFill(cs, _inkAccent(accent), 0.1, 0.12)+ : _buttonFill(cs, cs.onSurface, 0.06, 0.03, neutral: true),borderRadius: BorderRadius.circular(radius),border: Border.all(color: castActive- ? _inkAccent(accent).withValues(alpha: _inkAlpha(0.3, 1.0))- : cs.onSurface.withValues(alpha: _inkAlpha(0.08, 0.55))),+ ? _buttonEdge(_inkAccent(accent), 0.3, 1.0)+ : _buttonEdge(cs.onSurface, 0.08, 0.55)),),child: iconsOnly? Center(child: Icon(moreIcon, size: iconSz, color: iconColor))