pub struct Config {
pub theme: Theme,
pub theme_mode: ThemeMode,
pub fonts: FontConfig,
pub z_index_base: u32,
}Expand description
Runtime state used by Liora config behavior.
Fields§
§theme: ThemeActive Liora theme tokens stored in GPUI global state.
theme_mode: ThemeModeConfigured theme mode used to resolve light or dark tokens.
fonts: FontConfigOptional UI/code font family overrides.
z_index_base: u32Base z-index offset for overlay layering.
Implementations§
Source§impl Config
impl Config
Sourcepub fn set_theme_mode(&mut self, mode: ThemeMode, appearance: WindowAppearance)
pub fn set_theme_mode(&mut self, mode: ThemeMode, appearance: WindowAppearance)
Updates the stored theme mode value and keeps the existing component identity.
Sourcepub fn set_font_config(&mut self, fonts: FontConfig)
pub fn set_font_config(&mut self, fonts: FontConfig)
Replaces the app typography policy while preserving the active theme.
Sourcepub fn sync_system_theme(&mut self, appearance: WindowAppearance) -> bool
pub fn sync_system_theme(&mut self, appearance: WindowAppearance) -> bool
Synchronizes the active theme from the current system/window appearance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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> 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>
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<T> ReadGlobal for Twhere
T: Global,
impl<T> ReadGlobal for Twhere
T: Global,
Source§impl<T> UpdateGlobal for Twhere
T: Global,
impl<T> UpdateGlobal for Twhere
T: Global,
Source§fn update_global<C, F, R>(cx: &mut C, update: F) -> R
fn update_global<C, F, R>(cx: &mut C, update: F) -> R
Updates the global instance of the implementing type using the provided closure. Read more
Source§fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
Set the global instance of the implementing type.