pub struct DefaultStyle(/* private fields */);Expand description
W Style applied to SubMenu! not inside any other sub-menus.
Implementations§
Source§impl DefaultStyle
impl DefaultStyle
Sourcepub fn start_column_width(&self, width: impl IntoVar<Length>)
pub fn start_column_width(&self, width: impl IntoVar<Length>)
P Width of the icon/checkmark column.
This property sets START_COLUMN_WIDTH_VAR.
Source§impl DefaultStyle
impl DefaultStyle
Sourcepub fn end_column_width(&self, width: impl IntoVar<Length>)
pub fn end_column_width(&self, width: impl IntoVar<Length>)
P Width of the sub-menu expand symbol column.
This property sets END_COLUMN_WIDTH_VAR.
Source§impl DefaultStyle
impl DefaultStyle
Source§impl DefaultStyle
impl DefaultStyle
Sourcepub fn hover_open_delay(&self, delay: impl IntoVar<Duration>)
pub fn hover_open_delay(&self, delay: impl IntoVar<Duration>)
P Delay a sub-menu must be hovered to open the popup.
Is 300.ms() by default.
This property sets the HOVER_OPEN_DELAY_VAR.
Source§impl DefaultStyle
impl DefaultStyle
Sourcepub fn widget_new() -> Self
pub fn widget_new() -> Self
Start building a new instance.
Sourcepub fn widget_type() -> WidgetType
pub fn widget_type() -> WidgetType
Gets the widget type info.
Methods from Deref<Target = Style>§
Sourcepub fn widget_build(&mut self) -> StyleBuilder
pub fn widget_build(&mut self) -> StyleBuilder
Build the style.
Sourcepub fn replace(&self, replace: impl IntoValue<bool>)
pub fn replace(&self, replace: impl IntoValue<bool>)
B Fully replace the contextual style.
This is not enabled by default, if set to true the contextual style properties are removed.
Sourcepub fn named_style_fn(&self, name: impl IntoValue<NamedStyleVar>)
pub fn named_style_fn(&self, name: impl IntoValue<NamedStyleVar>)
B Set in the default properties of a named style to define the contextual variable for that style.
During widget instantiation, if this is set by default in a style the contextual style is used as the defaults and only the properties set on the style instance replace them.
This property is part of the named styles pattern, see impl_named_style_fn! for more details.
Note that this property expects a ContextVar<StyleFn> as a value, not a variable directly, it will also only work if
set in the default properties of a style type.
Trait Implementations§
Source§impl Deref for DefaultStyle
impl Deref for DefaultStyle
Auto Trait Implementations§
impl !Freeze for DefaultStyle
impl !RefUnwindSafe for DefaultStyle
impl !Unpin for DefaultStyle
impl !UnwindSafe for DefaultStyle
impl Send for DefaultStyle
impl Sync for DefaultStyle
impl UnsafeUnpin for DefaultStyle
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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