pub struct ThemeEditor {
pub open: bool,
pub widget_state: WidgetState,
pub hsla_edit_button: HslaEditButton,
pub color: Color,
pub bg_color: Color32,
pub size: (f32, f32),
}Expand description
In-app editor for a Theme.
Toggle ThemeEditor::open, then call ThemeEditor::show every
frame. Always install the (possibly mutated) theme afterwards.
Fields§
§open: boolWhen false, ThemeEditor::show is a no-op.
widget_state: WidgetStateThe current widget state being edited
Shared HSLA popup used by the color rows.
color: ColorCurrently selected named slot in the palette list.
bg_color: Color32Editor window background.
size: (f32, f32)Minimum (width, height) of the editor contents.
Implementations§
Trait Implementations§
Source§impl Clone for ThemeEditor
impl Clone for ThemeEditor
Source§fn clone(&self) -> ThemeEditor
fn clone(&self) -> ThemeEditor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ThemeEditor
impl RefUnwindSafe for ThemeEditor
impl Send for ThemeEditor
impl Sync for ThemeEditor
impl Unpin for ThemeEditor
impl UnsafeUnpin for ThemeEditor
impl UnwindSafe for ThemeEditor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more