From a6995f5419edcd8fb72ba11571c303404292cb83 Mon Sep 17 00:00:00 2001 From: afdul Date: Tue, 8 Oct 2024 03:14:49 +0530 Subject: [PATCH 1/3] fixed submenu keyboard click --- crates/egui/src/menu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/menu.rs b/crates/egui/src/menu.rs index 8faf8e77ceb..266a13d7a5a 100644 --- a/crates/egui/src/menu.rs +++ b/crates/egui/src/menu.rs @@ -698,7 +698,7 @@ impl MenuState { // We don't close the submenu if the pointer is on its way to hover it. // ensure to repaint once even when pointer is not moving ui.ctx().request_repaint(); - } else if !open && button.hovered() { + } else if !open && (button.hovered() || self.hovering_current_submenu(&pointer) || button.clicked()) { // TODO(emilk): open menu to the left if there isn't enough space to the right let mut pos = button.rect.right_top(); pos.x = self.rect.right() + ui.spacing().menu_spacing; From 826be222b4c0abdf2dc46ad6da2c08e546798d67 Mon Sep 17 00:00:00 2001 From: afdul Date: Tue, 8 Oct 2024 03:35:25 +0530 Subject: [PATCH 2/3] formatted --- crates/egui/src/menu.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/egui/src/menu.rs b/crates/egui/src/menu.rs index 266a13d7a5a..064ca828a56 100644 --- a/crates/egui/src/menu.rs +++ b/crates/egui/src/menu.rs @@ -698,7 +698,9 @@ impl MenuState { // We don't close the submenu if the pointer is on its way to hover it. // ensure to repaint once even when pointer is not moving ui.ctx().request_repaint(); - } else if !open && (button.hovered() || self.hovering_current_submenu(&pointer) || button.clicked()) { + } else if !open + && (button.hovered() || self.hovering_current_submenu(&pointer) || button.clicked()) + { // TODO(emilk): open menu to the left if there isn't enough space to the right let mut pos = button.rect.right_top(); pos.x = self.rect.right() + ui.spacing().menu_spacing; From b6dee1250f36d359e56c0f984f9235504e957a3a Mon Sep 17 00:00:00 2001 From: afdul Date: Fri, 22 Nov 2024 19:27:24 +0530 Subject: [PATCH 3/3] json --- .vscode/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 681dc12fe15..3e5c2433925 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,4 +33,5 @@ "--all-features", ], "rust-analyzer.showUnlinkedFileNotification": false, + "workbench.colorTheme": "CodeSandbox Black", }