fix(auto): give the equalizer actions distinct, state-aware icons
On a car head unit the custom actions render icon-first, so two actions sharing ic_stat_pluriwave were indistinguishable and the toggle gave no sign of whether the equalizer was on. Each action now has its own drawable, and the toggle swaps between ic_auto_eq_on and ic_auto_eq_off so its state is legible at a glance.
This commit is contained in:
@@ -154,12 +154,23 @@ String nombrePresetVisible(AppLocalizations l10n, String nombre) {
|
||||
/// screen (Design "EQ custom actions", item 4) — deliberately just 2: an
|
||||
/// on/off toggle plus a cycling-preset action, NOT one action per preset,
|
||||
/// since Android Auto only surfaces a limited number of custom actions.
|
||||
/// Folding "off" into the preset cycle (one button walking
|
||||
/// off → preset 1 → preset 2 → ... → preset 6 → off) was considered and
|
||||
/// REJECTED: with 6 presets that can take up to 6 taps to switch the EQ
|
||||
/// off while driving, which is worse for a driver than a dedicated one-tap
|
||||
/// toggle. Do not "simplify" this back down to a single action.
|
||||
/// Empty when [disponible] is false (gate on EQ availability, mirrors the
|
||||
/// existing `debeReaplicarEcualizador`/`_eqDisponible` gate) — a device
|
||||
/// without the native Equalizer effect gets no EQ actions at all, not
|
||||
/// broken ones. Reuses the SAME bundled `ic_stat_pluriwave` drawable the
|
||||
/// notification's own status-bar icon already uses (an equalizer-bars
|
||||
/// glyph) — zero new native assets. Pure, no handler dependency.
|
||||
/// broken ones.
|
||||
///
|
||||
/// On-device feedback follow-up: both actions used to reuse the SAME
|
||||
/// `ic_stat_pluriwave` drawable and were visually indistinguishable on a
|
||||
/// car head unit, which foregrounds the icon over the label. Each action
|
||||
/// now gets its own dedicated drawable (`ic_auto_eq_on`/`ic_auto_eq_off`/
|
||||
/// `ic_auto_eq_preset`), and the toggle's icon itself reflects [activo]
|
||||
/// (not just its label) so on/off is legible at a glance. Pure, no
|
||||
/// handler dependency.
|
||||
List<MediaControl> controlesEcualizadorPersonalizados({
|
||||
required bool disponible,
|
||||
required bool activo,
|
||||
@@ -169,14 +180,16 @@ List<MediaControl> controlesEcualizadorPersonalizados({
|
||||
if (!disponible) return const [];
|
||||
return [
|
||||
MediaControl.custom(
|
||||
androidIcon: 'drawable/ic_stat_pluriwave',
|
||||
androidIcon: activo
|
||||
? 'drawable/ic_auto_eq_on'
|
||||
: 'drawable/ic_auto_eq_off',
|
||||
label: activo
|
||||
? l10n.eqCustomActionDisableLabel
|
||||
: l10n.eqCustomActionEnableLabel,
|
||||
name: accionEqToggle,
|
||||
),
|
||||
MediaControl.custom(
|
||||
androidIcon: 'drawable/ic_stat_pluriwave',
|
||||
androidIcon: 'drawable/ic_auto_eq_preset',
|
||||
label: l10n.eqCustomActionPresetLabel(
|
||||
nombrePresetVisible(l10n, presetActual.nombre),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user