pub struct ContextMenuStyle {Show 14 fields
pub background: Color,
pub border: Color,
pub normal_fg: Color,
pub highlight_bg: Color,
pub highlight_fg: Color,
pub disabled_fg: Color,
pub shortcut_fg: Color,
pub separator_fg: Color,
pub min_width: u16,
pub max_width: u16,
pub max_visible_items: u16,
pub padding: u16,
pub submenu_indicator: &'static str,
pub separator_char: char,
}Expand description
Style configuration for context menu.
Fields§
§background: ColorBackground color for the menu.
border: ColorBorder color.
normal_fg: ColorNormal item foreground color.
highlight_bg: ColorHighlighted item background.
highlight_fg: ColorHighlighted item foreground.
disabled_fg: ColorDisabled item foreground.
shortcut_fg: ColorShortcut text color.
separator_fg: ColorSeparator color.
min_width: u16Minimum menu width.
max_width: u16Maximum menu width.
max_visible_items: u16Maximum visible items before scrolling.
padding: u16Horizontal padding inside menu.
Submenu indicator (e.g., “▶”).
separator_char: charSeparator character.
Implementations§
Source§impl ContextMenuStyle
impl ContextMenuStyle
Sourcepub fn max_visible_items(self, count: u16) -> Self
pub fn max_visible_items(self, count: u16) -> Self
Set maximum visible items.
Set the submenu indicator.
Trait Implementations§
Source§impl Clone for ContextMenuStyle
impl Clone for ContextMenuStyle
Source§fn clone(&self) -> ContextMenuStyle
fn clone(&self) -> ContextMenuStyle
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 ContextMenuStyle
impl Debug for ContextMenuStyle
Auto Trait Implementations§
impl Freeze for ContextMenuStyle
impl RefUnwindSafe for ContextMenuStyle
impl Send for ContextMenuStyle
impl Sync for ContextMenuStyle
impl Unpin for ContextMenuStyle
impl UnwindSafe for ContextMenuStyle
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> 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