Merge pull request #854 from pravdomil/claude/context-menu-spacing-41a5b2
UI: leave no gap between the rows of a menu # Conflicts: # crates/ui-egui/src/panels/viewer.rs
This commit is contained in:
@@ -1164,7 +1164,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
if hresp.drag_started() {
|
||||
ctx.data_mut(|d| d.insert_temp(drag_id, g.uid));
|
||||
}
|
||||
hresp.context_menu(|ui| {
|
||||
crate::widgets::context_menu(&hresp, |ui| {
|
||||
let lid = layer.id.0;
|
||||
let mut item = |ui: &mut egui::Ui, label: &str, enabled: bool, cmd: &str, params: serde_json::Value| {
|
||||
if ui.add_enabled(enabled, egui::Button::new(label)).clicked() {
|
||||
@@ -1246,7 +1246,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
let open = ui.input(|i| i.pointer.secondary_clicked())
|
||||
&& ui.rect_contains_pointer(body)
|
||||
&& (!egui::Popup::is_any_open(&ctx) || egui::Popup::is_id_open(&ctx, menu_id));
|
||||
egui::Popup::context_menu(&bg).id(menu_id).open_memory(open.then_some(egui::SetOpenCommand::Bool(true))).show(|ui| {
|
||||
egui::Popup::context_menu(&bg).style(crate::widgets::menu_style).id(menu_id).open_memory(open.then_some(egui::SetOpenCommand::Bool(true))).show(|ui| {
|
||||
ui.set_min_width(200.0);
|
||||
actions.extend(crate::menus::menu_contents(app, ui, "Effect"));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user