mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-28 03:37:00 -06:00
Panel menus light up under the pointer, like the menu bar's
Panel (≡) menu rows, and the Control bar's image menu, had no frame at all, so nothing showed which row the pointer was on. They now draw the hover frame the menu bar's items draw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
committed by
bflatastic
co-authored by
Claude Opus 5.5
parent
91e1434cbf
commit
7135a377f8
@@ -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