pub struct AccessibilityOptions {
pub font_scale: f32,
pub reduce_motion: bool,
pub reduce_transparency: bool,
pub increase_contrast: bool,
pub bold_text: bool,
pub invert_colors: bool,
}Expand description
What the person set in the system’s accessibility settings.
Fields§
§font_scale: f32The text size setting as a multiplier of the default, 1.0 when the person left it alone. Dynamic Type on iOS, the font size on Android and the web, the text scale of the desktop.
reduce_motion: boolWhether the person asked for less motion. Every animation then ends on its first frame.
reduce_transparency: boolWhether the person asked for less transparency. Glass then draws as a flat surface with no blur.
increase_contrast: boolWhether the person asked for more contrast. Secondary text, separators and fills then draw darker on light and lighter on dark.
bold_text: boolWhether the person asked for bold text. Every text style then gains a weight step.
invert_colors: boolWhether the system inverts colors and leaves this app’s window to invert its own, the way iOS Smart Invert does. The theme then swaps to its other palette and pictures stay as they are. A system that inverts the whole screen itself reports false.
Implementations§
Source§impl AccessibilityOptions
impl AccessibilityOptions
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
The options with the font scale made a plain number: finite and above zero, else 1.0.