pub struct MenuTheme {Show 21 fields
pub background_color: Option<Rgba>,
pub separator_color: Option<Rgba>,
pub row_height: Option<f32>,
pub min_row_height: Option<f32>,
pub icon_text_gap: Option<f32>,
pub icon_size: Option<f32>,
pub hover_background: Option<Rgba>,
pub hover_text_color: Option<Rgba>,
pub disabled_text_color: Option<Rgba>,
pub hover_border_color: Option<Rgba>,
pub bar_hover_background: Option<Rgba>,
pub bar_open_background: Option<Rgba>,
pub bar_hover_text_color: Option<Rgba>,
pub bar_padding_horizontal: Option<f32>,
pub bar_padding_vertical: Option<f32>,
pub active_background: Option<Rgba>,
pub active_text_color: Option<Rgba>,
pub panel_padding_horizontal: Option<f32>,
pub panel_padding_vertical: Option<f32>,
pub font: Option<FontSpec>,
pub border: Option<WidgetBorderSpec>,
}Expand description
Popup and context menu appearance, and the menu bar’s titles.
A menu bar is filled with toolbar.background_color, the fill of the one
tools area Breeze paints (docs/platform-facts.md §2.6, §2.13).
Fields§
§background_color: Option<Rgba>Menu panel background fill.
separator_color: Option<Rgba>Separator line color between menu items.
row_height: Option<f32>Height of an item row, drawn exactly at a text scale of 1. None
where the platform states no fixed row height: KDE’s rows size to
their content with a floor, min_row_height. Where both are stated,
this one is drawn and min_row_height is not applied
(docs/platform-facts.md §2.6).
min_row_height: Option<f32>Least height of a one-line item row in logical pixels; content taller
than it grows the row. Breeze’s row is 29 wherever the text line and
the icon are 20 px or less, and the text + 9 above that, where the
model’s row grows as the text + border’s vertical padding: one pixel
short there. Not applied where row_height is stated. None: the row
is its content’s height (docs/platform-facts.md §2.6).
icon_text_gap: Option<f32>Space between a menu item’s icon and its label.
icon_size: Option<f32>Menu item icon size in logical pixels.
hover_background: Option<Rgba>Menu item background on hover. It may be translucent, a layer over the
menu’s background_color (kde-breeze states #3daee94d, windows-11
#00000009 light and #ffffff0f dark): lay it over that fill, with
composite_over where the toolkit
replaces the fill rather than painting the highlight over it.
hover_text_color: Option<Rgba>Menu item text color on hover.
disabled_text_color: Option<Rgba>Disabled menu item text color.
hover_border_color: Option<Rgba>Outline of a hovered item’s highlight, drawn at
defaults.border.line_width inside the highlight, over the item’s
padding, so nothing moves, and rounded by border.corner_radius:
Breeze’s focus colour mixed 15 % towards WindowText. A pressed item
draws none where active_background is stated. None: no outline
(docs/platform-facts.md §2.6).
bar_hover_background: Option<Rgba>Fill of a menu-bar title under the pointer, rounded by
border.corner_radius: Breeze’s opaque hover colour. None: the title
keeps the connector’s own look (docs/platform-facts.md §2.6).
bar_open_background: Option<Rgba>Fill of a menu-bar title whose menu is open: Breeze’s focus colour.
None: bar_hover_background; with both None, the connector’s own
look (docs/platform-facts.md §2.6).
bar_hover_text_color: Option<Rgba>Text colour of a menu-bar title under the pointer or open: Breeze’s
HighlightedText. None: the title keeps its text colour
(docs/platform-facts.md §2.6).
bar_padding_horizontal: Option<f32>Inset of a menu-bar title’s text from its left and right edge, in
logical pixels: Breeze’s MenuBarItem_MarginWidth 10; titles so padded
touch. None: the connector’s own title padding
(docs/platform-facts.md §2.6).
bar_padding_vertical: Option<f32>Inset of a menu-bar title’s text from its top and bottom edge, in
logical pixels: Breeze’s MenuBarItem_MarginHeight 6. None: the
connector’s own title padding (docs/platform-facts.md §2.6).
active_background: Option<Rgba>Fill of an item while the mouse button is held on it: Breeze’s opaque
focus colour. Where it is stated, a pressed item draws no
hover_border_color outline (Breeze’s outline is the fill’s own
colour). None: a pressed item keeps the hover look, outline included
(docs/platform-facts.md §2.6).
active_text_color: Option<Rgba>Text colour of a pressed item: Breeze’s HighlightedText. None:
hover_text_color (docs/platform-facts.md §2.6).
panel_padding_horizontal: Option<f32>Inset of the items from the left and right of the menu panel’s frame
line, in logical pixels; the frame is popover.border’s. Breeze’s
PM_MenuHMargin 4 counts from the panel’s outer edge, its 1 px line
included, so kde-breeze states 3. Rows so inset touch. None: the
items are inset by popover.border’s padding (docs/platform-facts.md
§2.6).
panel_padding_vertical: Option<f32>Inset of the items from the top and bottom of the menu panel’s frame
line, in logical pixels; the frame is popover.border’s. Breeze’s
PM_MenuVMargin 4 counts from the panel’s outer edge, its 1 px line
included, so kde-breeze states 3. Rows so inset touch. None: the
items are inset by popover.border’s padding (docs/platform-facts.md
§2.6).
font: Option<FontSpec>Menu item font specification.
border: Option<WidgetBorderSpec>Menu border specification: its padding insets an item’s contents from
the edges of the item’s highlight. Its corner radius is the platform’s
menu radius, which KDE gives a hovered item’s highlight and Material the
menu’s container (the iced connector rounds a drop-down’s panel with
it, the egui connector a menu’s items). It has no colour of its own:
the menu’s popup frame is the popover’s, popover.border
(docs/platform-facts.md §2.6, §2.16). No bundled preset states this border’s colour or width; unstated,
they resolve to transparent and 0.
Implementations§
Source§impl MenuTheme
impl MenuTheme
Sourcepub const FIELD_NAMES: &[&str]
pub const FIELD_NAMES: &[&str]
All serialized field names for this widget theme, for TOML linting.