pub struct DesktopPreferences {
pub accent_color: Option<[f32; 3]>,
pub high_contrast: Option<bool>,
pub reduced_motion: Option<bool>,
pub text_scale: Option<f32>,
pub font: Option<String>,
pub titlebar_double_click: Option<TitlebarAction>,
pub titlebar_middle_click: Option<TitlebarAction>,
pub titlebar_right_click: Option<TitlebarAction>,
}Expand description
Desktop preferences exposed by the platform, independent of a particular toolkit.
None means unavailable or unset, not an instruction to override an app’s defaults.
Linux reads Settings portal keys with optional native desktop fallbacks; other
platforms currently return an empty snapshot. Color scheme and button placement
retain their existing separate APIs.
These preferences do not change application styling or behavior automatically.
Fields§
§accent_color: Option<[f32; 3]>Preferred accent as encoded sRGB components in the inclusive range 0–1.
high_contrast: Option<bool>Whether the desktop explicitly requests high contrast.
reduced_motion: Option<bool>Whether the desktop explicitly requests reduced motion.
text_scale: Option<f32>Positive logical text scale, independent of device/display scaling.
font: Option<String>Desktop font description, for example Cantarell 11; not a font family alone.
titlebar_double_click: Option<TitlebarAction>Preferred title-bar double-click action, when exposed by the desktop.
titlebar_middle_click: Option<TitlebarAction>Preferred title-bar middle-click action, when exposed by the desktop.
titlebar_right_click: Option<TitlebarAction>Preferred title-bar right-click action, when exposed by the desktop.
Trait Implementations§
Source§impl Clone for DesktopPreferences
impl Clone for DesktopPreferences
Source§impl Debug for DesktopPreferences
impl Debug for DesktopPreferences
Source§impl Default for DesktopPreferences
impl Default for DesktopPreferences
Source§impl PartialEq for DesktopPreferences
impl PartialEq for DesktopPreferences
impl StructuralPartialEq for DesktopPreferences
Auto Trait Implementations§
impl Forget for DesktopPreferences
impl Freeze for DesktopPreferences
impl Move for DesktopPreferences
impl RefUnwindSafe for DesktopPreferences
impl Send for DesktopPreferences
impl Sync for DesktopPreferences
impl Unpin for DesktopPreferences
impl UnsafeUnpin for DesktopPreferences
impl UnwindSafe for DesktopPreferences
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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>
ReadEndian::read_from_little_endian().