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) -> AccessibilityOptions
pub fn normalized(self) -> AccessibilityOptions
The options with the font scale made a plain number: finite and above zero, else 1.0.
Trait Implementations§
Source§impl Clone for AccessibilityOptions
impl Clone for AccessibilityOptions
Source§fn clone(&self) -> AccessibilityOptions
fn clone(&self) -> AccessibilityOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AccessibilityOptions
Source§impl Debug for AccessibilityOptions
impl Debug for AccessibilityOptions
Source§impl Default for AccessibilityOptions
impl Default for AccessibilityOptions
Source§fn default() -> AccessibilityOptions
fn default() -> AccessibilityOptions
Source§impl PartialEq for AccessibilityOptions
impl PartialEq for AccessibilityOptions
impl StructuralPartialEq for AccessibilityOptions
Auto Trait Implementations§
impl Freeze for AccessibilityOptions
impl RefUnwindSafe for AccessibilityOptions
impl Send for AccessibilityOptions
impl Sync for AccessibilityOptions
impl Unpin for AccessibilityOptions
impl UnsafeUnpin for AccessibilityOptions
impl UnwindSafe for AccessibilityOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.