pub struct ThemeBuilder { /* private fields */ }Expand description
Builder for creating custom themes with defaults from Theme::dark().
Implementations§
Source§impl ThemeBuilder
impl ThemeBuilder
Sourcepub const fn selected_bg(self, color: Color) -> Self
pub const fn selected_bg(self, color: Color) -> Self
Set the selected item background color.
Sourcepub const fn selected_fg(self, color: Color) -> Self
pub const fn selected_fg(self, color: Color) -> Self
Set the selected item foreground color.
Sourcepub const fn surface_hover(self, color: Color) -> Self
pub const fn surface_hover(self, color: Color) -> Self
Set the surface hover color.
Sourcepub const fn surface_text(self, color: Color) -> Self
pub const fn surface_text(self, color: Color) -> Self
Set the surface text color.
Sourcepub const fn build(self) -> Theme
pub const fn build(self) -> Theme
Build the theme. Unfilled fields use Theme::dark() defaults.
match is used in place of Option::unwrap_or so the entire
builder chain compiles in const context (MSRV 1.81). All fields
involved are Copy, so Some(c) => c is a plain bit-copy.
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