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:
BFlat
2026-10-16 04:32:17 +07:00
committed by GitHub
+2 -1
View File
@@ -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