pub struct ThemeBuilder { /* private fields */ }Expand description
Builder for creating custom themes.
Implementations§
Source§impl ThemeBuilder
impl ThemeBuilder
Sourcepub fn from_theme(theme: Theme) -> Self
pub fn from_theme(theme: Theme) -> Self
Start from a base theme.
Sourcepub fn primary(self, color: impl Into<AdaptiveColor>) -> Self
pub fn primary(self, color: impl Into<AdaptiveColor>) -> Self
Set the primary color.
Sourcepub fn secondary(self, color: impl Into<AdaptiveColor>) -> Self
pub fn secondary(self, color: impl Into<AdaptiveColor>) -> Self
Set the secondary color.
Sourcepub fn accent(self, color: impl Into<AdaptiveColor>) -> Self
pub fn accent(self, color: impl Into<AdaptiveColor>) -> Self
Set the accent color.
Sourcepub fn background(self, color: impl Into<AdaptiveColor>) -> Self
pub fn background(self, color: impl Into<AdaptiveColor>) -> Self
Set the background color.
Sourcepub fn surface(self, color: impl Into<AdaptiveColor>) -> Self
pub fn surface(self, color: impl Into<AdaptiveColor>) -> Self
Set the surface color.
Sourcepub fn overlay(self, color: impl Into<AdaptiveColor>) -> Self
pub fn overlay(self, color: impl Into<AdaptiveColor>) -> Self
Set the overlay color.
Sourcepub fn text(self, color: impl Into<AdaptiveColor>) -> Self
pub fn text(self, color: impl Into<AdaptiveColor>) -> Self
Set the text color.
Sourcepub fn text_muted(self, color: impl Into<AdaptiveColor>) -> Self
pub fn text_muted(self, color: impl Into<AdaptiveColor>) -> Self
Set the muted text color.
Sourcepub fn text_subtle(self, color: impl Into<AdaptiveColor>) -> Self
pub fn text_subtle(self, color: impl Into<AdaptiveColor>) -> Self
Set the subtle text color.
Sourcepub fn success(self, color: impl Into<AdaptiveColor>) -> Self
pub fn success(self, color: impl Into<AdaptiveColor>) -> Self
Set the success color.
Sourcepub fn warning(self, color: impl Into<AdaptiveColor>) -> Self
pub fn warning(self, color: impl Into<AdaptiveColor>) -> Self
Set the warning color.
Sourcepub fn error(self, color: impl Into<AdaptiveColor>) -> Self
pub fn error(self, color: impl Into<AdaptiveColor>) -> Self
Set the error color.
Sourcepub fn info(self, color: impl Into<AdaptiveColor>) -> Self
pub fn info(self, color: impl Into<AdaptiveColor>) -> Self
Set the info color.
Sourcepub fn border(self, color: impl Into<AdaptiveColor>) -> Self
pub fn border(self, color: impl Into<AdaptiveColor>) -> Self
Set the border color.
Sourcepub fn border_focused(self, color: impl Into<AdaptiveColor>) -> Self
pub fn border_focused(self, color: impl Into<AdaptiveColor>) -> Self
Set the focused border color.
Sourcepub fn selection_bg(self, color: impl Into<AdaptiveColor>) -> Self
pub fn selection_bg(self, color: impl Into<AdaptiveColor>) -> Self
Set the selection background color.
Sourcepub fn selection_fg(self, color: impl Into<AdaptiveColor>) -> Self
pub fn selection_fg(self, color: impl Into<AdaptiveColor>) -> Self
Set the selection foreground color.
Sourcepub fn scrollbar_track(self, color: impl Into<AdaptiveColor>) -> Self
pub fn scrollbar_track(self, color: impl Into<AdaptiveColor>) -> Self
Set the scrollbar track color.
Sourcepub fn scrollbar_thumb(self, color: impl Into<AdaptiveColor>) -> Self
pub fn scrollbar_thumb(self, color: impl Into<AdaptiveColor>) -> Self
Set the scrollbar thumb color.
Trait Implementations§
Source§impl Clone for ThemeBuilder
impl Clone for ThemeBuilder
Source§fn clone(&self) -> ThemeBuilder
fn clone(&self) -> ThemeBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThemeBuilder
impl Debug for ThemeBuilder
Auto Trait Implementations§
impl Freeze for ThemeBuilder
impl RefUnwindSafe for ThemeBuilder
impl Send for ThemeBuilder
impl Sync for ThemeBuilder
impl Unpin for ThemeBuilder
impl UnsafeUnpin for ThemeBuilder
impl UnwindSafe for ThemeBuilder
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