pub struct AccessibilitySettings {
pub high_contrast: bool,
pub prefer_reduced_motion: bool,
pub screen_reader_enabled: bool,
pub font_scale: f32,
}Expand description
Accessibility settings
Fields§
§high_contrast: boolUse high contrast colors
prefer_reduced_motion: boolReduce or disable animations
screen_reader_enabled: boolScreen reader is active
font_scale: f32Font scale multiplier (1.0 = normal, 1.5 = 150%, etc.)
Implementations§
Trait Implementations§
Source§impl Clone for AccessibilitySettings
impl Clone for AccessibilitySettings
Source§fn clone(&self) -> AccessibilitySettings
fn clone(&self) -> AccessibilitySettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AccessibilitySettings
impl Debug for AccessibilitySettings
Auto Trait Implementations§
impl Freeze for AccessibilitySettings
impl RefUnwindSafe for AccessibilitySettings
impl Send for AccessibilitySettings
impl Sync for AccessibilitySettings
impl Unpin for AccessibilitySettings
impl UnwindSafe for AccessibilitySettings
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<T> UseAccessibility for T
impl<T> UseAccessibility for T
Source§fn use_accessibility<'a>(
&self,
ctx: &'a RenderContext<'_>,
) -> &'a AccessibilitySettings
fn use_accessibility<'a>( &self, ctx: &'a RenderContext<'_>, ) -> &'a AccessibilitySettings
Get accessibility settings
Source§fn use_high_contrast(&self, ctx: &RenderContext<'_>) -> bool
fn use_high_contrast(&self, ctx: &RenderContext<'_>) -> bool
Check if high contrast mode is enabled
Source§fn use_font_scale(&self, ctx: &RenderContext<'_>) -> f32
fn use_font_scale(&self, ctx: &RenderContext<'_>) -> f32
Get font scale multiplier
Source§fn use_scaled(&self, ctx: &RenderContext<'_>, base: u16) -> u16
fn use_scaled(&self, ctx: &RenderContext<'_>, base: u16) -> u16
Scale a dimension based on accessibility settings
Source§impl<T> UseLocale for T
impl<T> UseLocale for T
Source§fn use_locale<'a>(&self, ctx: &'a RenderContext<'_>) -> &'a Locale
fn use_locale<'a>(&self, ctx: &'a RenderContext<'_>) -> &'a Locale
Get the current locale
Source§fn use_is_rtl(&self, ctx: &RenderContext<'_>) -> bool
fn use_is_rtl(&self, ctx: &RenderContext<'_>) -> bool
Check if current locale is RTL
Source§impl<T> UseSlots for T
impl<T> UseSlots for T
Source§fn use_header_slot<'a>(&self, ctx: &'a RenderContext<'_>, slot: &str) -> &'a str
fn use_header_slot<'a>(&self, ctx: &'a RenderContext<'_>, slot: &str) -> &'a str
Get header slot content
Source§fn use_status_slot<'a>(&self, ctx: &'a RenderContext<'_>, slot: &str) -> &'a str
fn use_status_slot<'a>(&self, ctx: &'a RenderContext<'_>, slot: &str) -> &'a str
Get status bar slot content
Source§fn use_header_has(&self, ctx: &RenderContext<'_>, slot: &str) -> bool
fn use_header_has(&self, ctx: &RenderContext<'_>, slot: &str) -> bool
Check if header slot has content
Source§fn use_status_has(&self, ctx: &RenderContext<'_>, slot: &str) -> bool
fn use_status_has(&self, ctx: &RenderContext<'_>, slot: &str) -> bool
Check if status slot has content
Source§impl<T> UseTheme for T
impl<T> UseTheme for T
Source§fn use_theme<'a>(&self, ctx: &'a RenderContext<'_>) -> &'a Theme
fn use_theme<'a>(&self, ctx: &'a RenderContext<'_>) -> &'a Theme
Get the current theme
Source§fn use_text_direction(&self, ctx: &RenderContext<'_>) -> TextDirection
fn use_text_direction(&self, ctx: &RenderContext<'_>) -> TextDirection
Get text direction from theme