pub struct MenuBarStyle {Show 18 fields
pub bar_bg: Color,
pub bar_fg: Color,
pub bar_highlight_bg: Color,
pub bar_highlight_fg: Color,
pub dropdown_bg: Color,
pub dropdown_border: Color,
pub item_fg: Color,
pub item_highlight_bg: Color,
pub item_highlight_fg: Color,
pub shortcut_fg: Color,
pub disabled_fg: Color,
pub separator_fg: Color,
pub dropdown_min_width: u16,
pub dropdown_max_height: u16,
pub menu_padding: u16,
pub dropdown_padding: u16,
pub submenu_indicator: &'static str,
pub separator_char: char,
}Expand description
Style configuration for menu bar.
Fields§
§bar_bg: ColorBackground color for the menu bar.
bar_fg: ColorForeground color for menu labels.
bar_highlight_bg: ColorBackground color for highlighted menu label.
bar_highlight_fg: ColorForeground color for highlighted menu label.
dropdown_bg: ColorBackground color for dropdown.
dropdown_border: ColorBorder color for dropdown.
item_fg: ColorNormal item foreground color.
item_highlight_bg: ColorHighlighted item background.
item_highlight_fg: ColorHighlighted item foreground.
shortcut_fg: ColorShortcut text color.
disabled_fg: ColorDisabled item/menu foreground.
separator_fg: ColorSeparator color.
dropdown_min_width: u16Minimum dropdown width.
dropdown_max_height: u16Maximum dropdown height (items visible).
Padding between menu labels.
dropdown_padding: u16Horizontal padding inside dropdown.
Submenu indicator.
separator_char: charSeparator character.
Implementations§
Source§impl MenuBarStyle
impl MenuBarStyle
Sourcepub fn bar_colors(self, fg: Color, bg: Color) -> Self
pub fn bar_colors(self, fg: Color, bg: Color) -> Self
Set bar colors.
Sourcepub fn bar_highlight(self, fg: Color, bg: Color) -> Self
pub fn bar_highlight(self, fg: Color, bg: Color) -> Self
Set bar highlight colors.
Sourcepub fn dropdown_colors(self, fg: Color, bg: Color, border: Color) -> Self
pub fn dropdown_colors(self, fg: Color, bg: Color, border: Color) -> Self
Set dropdown colors.
Sourcepub fn item_highlight(self, fg: Color, bg: Color) -> Self
pub fn item_highlight(self, fg: Color, bg: Color) -> Self
Set item highlight colors.
Sourcepub fn dropdown_min_width(self, width: u16) -> Self
pub fn dropdown_min_width(self, width: u16) -> Self
Set minimum dropdown width.
Sourcepub fn dropdown_max_height(self, height: u16) -> Self
pub fn dropdown_max_height(self, height: u16) -> Self
Set maximum dropdown height.
Set the submenu indicator.
Trait Implementations§
Source§impl Clone for MenuBarStyle
impl Clone for MenuBarStyle
Source§fn clone(&self) -> MenuBarStyle
fn clone(&self) -> MenuBarStyle
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 MenuBarStyle
impl Debug for MenuBarStyle
Auto Trait Implementations§
impl Freeze for MenuBarStyle
impl RefUnwindSafe for MenuBarStyle
impl Send for MenuBarStyle
impl Sync for MenuBarStyle
impl Unpin for MenuBarStyle
impl UnwindSafe for MenuBarStyle
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