pub struct MenuTheme {
pub background_color: Option<Rgba>,
pub separator_color: Option<Rgba>,
pub 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 font: Option<FontSpec>,
pub border: Option<WidgetBorderSpec>,
}Expand description
Popup and context menu appearance.
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 a single menu item row. None where the platform states
no fixed row height: KDE’s menu items size to their content with a
floor, which this field cannot carry (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.
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.