mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 18:27:02 -06:00
Merge pull request #2083 from fabian-co/fix/panel-menu-hover
Panel menus light up under the pointer, like the menu bar's
This commit is contained in:
@@ -1566,9 +1566,10 @@ pub fn menu_item(ui: &mut Ui, label: &str, enabled: bool, checked: bool) -> bool
|
||||
}
|
||||
|
||||
/// [`menu_item`] for a name that is user or file data (a library, a recent URL), never translated.
|
||||
/// Like the menu bar's items, the row lights up under the pointer.
|
||||
pub fn menu_item_name(ui: &mut Ui, label: &str, enabled: bool, checked: bool) -> bool {
|
||||
let text = if checked { format!("✓ {label}") } else { format!(" {label}") };
|
||||
ui.add_enabled(enabled, egui::Button::new(egui::RichText::new(text).size(12.5)).frame(false)).clicked()
|
||||
ui.add_enabled(enabled, egui::Button::new(egui::RichText::new(text).size(12.5)).frame_when_inactive(false)).clicked()
|
||||
}
|
||||
|
||||
/// A number field that may be empty (Stroke dash/gap): `value` (points) shows in `unit` without
|
||||
|
||||
Reference in New Issue
Block a user