pub struct AccessibilityPreferences {
pub text_scaling_factor: f32,
pub reduce_motion: bool,
pub high_contrast: bool,
pub reduce_transparency: bool,
}Expand description
OS-detected accessibility preferences.
A single copy lives on SystemTheme, shared across light and dark
variants. These are runtime values detected from the OS – not stored
in TOML presets.
Fields§
§text_scaling_factor: f32Text scaling factor (1.0 = no scaling). Multiply font sizes by this factor when honoring the user’s preference for larger text.
reduce_motion: boolWhether the user has requested reduced motion.
high_contrast: boolWhether a high-contrast mode is active.
reduce_transparency: boolWhether the user has requested reduced transparency.
Implementations§
Source§impl AccessibilityPreferences
impl AccessibilityPreferences
Sourcepub fn from_system() -> Self
pub fn from_system() -> Self
Read the OS accessibility preferences without resolving a theme.
Runs the same platform reader SystemTheme::from_system runs (KDE
kdeglobals, GNOME portal + gsettings) and takes its accessibility
block; reduce_motion is additionally read through
crate::detect::detect_reduced_motion on every platform. Fields no
reader supplies keep their defaults. Never fails: with no reader or a
failing reader the defaults are returned.
Use it on the preset path, where accessibility is orthogonal to the theme choice (a user with large text wants it under a preset too).