feat(engine): reduce-transparency + high-contrast support for glass chrome

New Settings::reduce_transparency_mode (serde-default, Accessibility
toggle row) swaps every GlassSurface's gradients for a flat opaque
BG_ELEVATED fill; high-contrast mode now also boosts the glass fill
opacity and rim luminance to BORDER_SUBTLE_HC levels. Both applied by
settings_plugin::update_glass_surfaces, which retargets the gradients
in place on toggle or on newly spawned glass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-07-15 15:16:32 -07:00
parent b405e54bb0
commit c2256582cd
6 changed files with 245 additions and 28 deletions
@@ -353,6 +353,14 @@ pub(super) fn handle_settings_buttons(
**t = on_off_label(settings.0.reduce_motion_mode);
}
}
SettingsButton::ToggleReduceTransparency => {
settings.0.reduce_transparency_mode = !settings.0.reduce_transparency_mode;
persist(&path, &settings.0);
changed.write(SettingsChangedEvent(settings.0.clone()));
// Text refreshed by `update_reduce_transparency_text`; the
// glass chrome itself follows via `update_glass_surfaces`
// next frame.
}
SettingsButton::ToggleTouchInputMode => {
use solitaire_data::settings::TouchInputMode;
settings.0.touch_input_mode = match settings.0.touch_input_mode {