Struct ThemeLayerStack
pub struct ThemeLayerStack {
pub distribution_defaults: Option<DistributionDefaults>,
pub user_theme: Option<ThemeDocument>,
pub window: WindowAppearance,
pub accessibility: AccessibilityLayer,
}Expand description
Inputs to resolve_theme_layers. Absent layers contribute nothing.
Fields§
§distribution_defaults: Option<DistributionDefaults>§user_theme: Option<ThemeDocument>The theme the person chose for the current mode. None means they
have not chosen one, or chose one this build does not admit.
window: WindowAppearanceWhere and for whom the window is shown: the temperature of its
workspace (the person’s override for it,
workspace_temperature_override, or the hue of its wallpaper,
crate::theme::workspace_hue) and the person’s own colour. Set by
the host that shows the window — the shell, for its chrome and over
the shell-ui channel for every app window. A settings document never
supplies it: the temperature belongs to a workspace and the colour to
an identity, not to the theme.
accessibility: AccessibilityLayerImplementations§
§impl ThemeLayerStack
impl ThemeLayerStack
pub fn from_settings_json(text: &str, moment: LocalMoment) -> ThemeLayerStack
pub fn from_settings_json(text: &str, moment: LocalMoment) -> ThemeLayerStack
Read a settings document. An appearance section that names no theme is “no user theme”, not the dark preset, so distribution defaults still show. An unreadable document is an empty stack (built-in defaults only).
Trait Implementations§
§impl Clone for ThemeLayerStack
impl Clone for ThemeLayerStack
§fn clone(&self) -> ThemeLayerStack
fn clone(&self) -> ThemeLayerStack
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ThemeLayerStack
impl Debug for ThemeLayerStack
§impl Default for ThemeLayerStack
impl Default for ThemeLayerStack
§fn default() -> ThemeLayerStack
fn default() -> ThemeLayerStack
Auto Trait Implementations§
impl Freeze for ThemeLayerStack
impl RefUnwindSafe for ThemeLayerStack
impl Send for ThemeLayerStack
impl Sync for ThemeLayerStack
impl Unpin for ThemeLayerStack
impl UnsafeUnpin for ThemeLayerStack
impl UnwindSafe for ThemeLayerStack
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more