pub struct ShellOptions {
pub titlebar_background: Option<u32>,
pub colors: Option<ShellColors>,
pub high_contrast: Option<bool>,
pub accent: Option<u32>,
pub text_scale: Option<f32>,
pub typography: Option<ShellTypography>,
pub reduced_motion: Option<bool>,
pub double_click_action: Option<TitlebarAction>,
pub middle_click_action: Option<TitlebarAction>,
pub right_click_action: Option<TitlebarAction>,
}Expand description
Optional per-window overrides. None follows desktop preferences, then built-in fallbacks.
Unlike the initial experimental API, these fields are optional: wrap explicit values in
Some(...). This preserves explicit false and TitlebarAction::None overrides.
Explicit colors take precedence over the desktop/default high-contrast palette;
the application is responsible for their contrast and active/inactive variants.
Native appearance and button placement retain the platform’s existing APIs.
Fields§
§titlebar_background: Option<u32>Opaque sRGB 0xRRGGBB background for the entire shared titlebar, including
reserved control space and padding. Wins over colors.header.
None uses the supplied palette header or the desktop/default header.
colors: Option<ShellColors>Explicit shared-frame colors, overriding appearance, activation and the
default high-contrast palette. Does not theme application content, native
macOS artwork or compositor decorations, or synchronize native appearance.
Focus uses accent, except in high contrast where it uses colors.text.
high_contrast: Option<bool>Override system high contrast.
accent: Option<u32>Override the sRGB focus accent as 0xRRGGBB.
text_scale: Option<f32>Override logical text/target scaling, independent of device DPI.
typography: Option<ShellTypography>Override client-frame typography; None parses the desktop description or uses system UI.
reduced_motion: Option<bool>Resolve motion policy for consumers; the current frame has no animations.
double_click_action: Option<TitlebarAction>Override the desktop double-click action; fallback is maximize/restore.
middle_click_action: Option<TitlebarAction>Override the desktop middle-click action; fallback is no action.
right_click_action: Option<TitlebarAction>Override the desktop right-click action; fallback is the window menu.
Implementations§
Source§impl ShellOptions
impl ShellOptions
Sourcepub fn resolved_preferences(
&self,
desktop: &DesktopPreferences,
) -> ResolvedShellPreferences
pub fn resolved_preferences( &self, desktop: &DesktopPreferences, ) -> ResolvedShellPreferences
Resolve the same values used by the client frame. This does not apply them to native/server decorations or alter desktop settings. Useful for diagnostics.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ShellOptions
impl Freeze for ShellOptions
impl Move for ShellOptions
impl RefUnwindSafe for ShellOptions
impl Send for ShellOptions
impl Sync for ShellOptions
impl Unpin for ShellOptions
impl UnsafeUnpin for ShellOptions
impl UnwindSafe for ShellOptions
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
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().