-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu root remains displayed when action from sub-menu is selected #312
Comments
hmm no that is not intended behavior they should all be closing. |
Hi |
I'd have to create an app that has only that.... |
basically we would like you to try and recreate it in the most minimal possible way So we can find the issues causing it. This also ensures the issue is only the menu widget and does not have to do with some other control etc etc.. |
I was taking a look at the menu example. I see none of the "leaf nodes" do any action that closes any of the menus. I'll try to do that in my fork. |
I wonder if it is related to our use of a "fake" Message in menu clicks, such as this:
Without it, we cannot get menus to highlight on hover (items do, but not the root or sub-menus that have items). I notice example menus do, so not sure why we can't get that to work? |
hmm does the menu close fine without that? if so it could be the button is returning an event saying it was processed and the menu is then not processing much else. |
I think menu item selection and closure is unaffected by that, but I can
test later to be sure.
…On Thu, Dec 12, 2024, 2:01 PM Andrew Wheeler(Genusis) < ***@***.***> wrote:
hmm does the menu close fine without that? if so it could be the button is
returning an event saying it was processed and the menu is then not
processing much else.
—
Reply to this email directly, view it on GitHub
<#312 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKF4LAOYL3AT5FUQ3DGTIT2FGCJXAVCNFSM6AAAAABTEKBTFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZYHA2DIMZUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Removing those on_press() call - No Change |
When the action is performed (after on_select) - the menu contents update (that was causing a panic which we fixed in a prior PR), not sure if that is relevant for the fact it doesn't close. Maybe the logic for closing is skipped due to the "fix" in the PR that fixed the panic? |
could very well be the issue. Can you see about making a minimal Example with the issue so we can rule out anything else? |
How do you catch your "fake" message ? |
in update() of the app, with an empty entry: https://github.com/andrewdavidmackenzie/pigg/blob/master/src/piggui.rs#L293 |
So it's a real event you just do nothing. I now that for what you are doing instead of using a button, I used a badge and I don't get you issue. But even with the button it shouldn't be an issue, I'll look into it. But it would be awesome if you could do a minimal example of the bug. |
I'll try over the weekend.
Maybe we could modify menu example to have a mix of badges and buttons?
…On Fri, Dec 13, 2024, 2:31 AM Ultraxime ***@***.***> wrote:
So it's a real event you just do nothing.
I now that for what you are doing instead of using a button, I used a
badge and I don't get you issue.
But even with the button it shouldn't be an issue, I'll look into it. But
it would be awesome if you could do a minimal example of the bug.
—
Reply to this email directly, view it on GitHub
<#312 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKF4LALMOIEQOV2BOY3QOT2FI2IBAVCNFSM6AAAAABTEKBTFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBQGM2DAMZZG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
any updates on getting the minimal example? |
No, sorry. Xmas holidays intervened.....
…On Thu, Dec 26, 2024, 1:06 PM Andrew Wheeler(Genusis) < ***@***.***> wrote:
any updates on getting the minimal example?
—
Reply to this email directly, view it on GitHub
<#312 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKF4LALJM745NQS46K6L7T2HPWN3AVCNFSM6AAAAABTEKBTFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRSGU4DAMZWGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have a menu bar, with a number of menu roots on it ("hardware:...." in the image below)
One (the mentioned "hardware:..." menu) has sub menus (one for each device discovered, such as "Fake RPi (...)")
That sub-menu has menu items that are actions on the device (such as "Connect to Device" and "Display Device details..." shown in the image below).
When I select the menu item (e.g. "Connect to Device" in the image), the sub-sub-menu closes, the sub-menu closes but the root menu remains displayed, obscuring part of the UI that is changing due to the action (the mouse pointer is no longer over any part of the menu that remains displayed).
Is this the intended behaviour?
Is there a way I can get the menu to close when an action is selected?
The text was updated successfully, but these errors were encountered: