pub struct MediaQuery {
pub text_scale: f32,
pub is_dark: bool,
pub bold_text: bool,
pub reduce_motion: bool,
pub always_24_hour_format: bool,
}Expand description
OS/environment values a widget might want to adapt to, beyond what
use_platform()/use_safe_area() already cover.
Fields§
§text_scale: f32OS accessibility text-size multiplier — see this module’s own doc.
is_dark: boolSystem-wide light/dark appearance — true when the OS is in dark
mode. Drives rosace_theme::sync_system_theme unless the app has
locked a ThemeMode.
bold_text: boolOS accessibility “bold text everywhere” toggle.
reduce_motion: boolOS accessibility “reduce motion” toggle — when set, ROSACE’s default
animations snap instead of easing (see PaintCtx::animate_to).
always_24_hour_format: boolWhether the OS locale/settings prefer a 24-hour clock over 12-hour
- AM/PM. Detection-only today — see this module’s own doc.
Trait Implementations§
Source§impl Clone for MediaQuery
impl Clone for MediaQuery
Source§fn clone(&self) -> MediaQuery
fn clone(&self) -> MediaQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MediaQuery
Source§impl Debug for MediaQuery
impl Debug for MediaQuery
Source§impl Default for MediaQuery
impl Default for MediaQuery
Source§impl PartialEq for MediaQuery
impl PartialEq for MediaQuery
impl StructuralPartialEq for MediaQuery
Auto Trait Implementations§
impl Freeze for MediaQuery
impl RefUnwindSafe for MediaQuery
impl Send for MediaQuery
impl Sync for MediaQuery
impl Unpin for MediaQuery
impl UnsafeUnpin for MediaQuery
impl UnwindSafe for MediaQuery
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