Skip to content
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

Open a menu upwards instead of downwards #2175

Closed
jsguay-legion opened this issue Oct 21, 2022 · 1 comment
Closed

Open a menu upwards instead of downwards #2175

jsguay-legion opened this issue Oct 21, 2022 · 1 comment
Labels
feature New feature or request

Comments

@jsguay-legion
Copy link

This may be similar to #1176 but only in a general sense that if I use the egui::TopBottomPanel::bottom() and put a menu button in it, the menu still opens downwards so it's outside the screen.

Is your feature request related to a problem? Please describe.

I'd like to be able to have menu buttons on the egui::TopBottomPanel::bottom() panel, and have the menus open upwards.

Describe the solution you'd like

Ideally I think if a popup is going to open outside the screen it should be automatically repositioned to be inside the screen, as mentioned in the above issue.

Describe alternatives you've considered

I tried to write a version of popup_below_widget (called popup_above_widget) but I don't know how to get the size of the menu that would be created by add_contents(ui) in order to offset the popup (in .fixed_pos(...)). This is down to my lack of knowledge, so if this is something that's easy to answer, it may be sufficient to do what I want.

Additional context

Nothing to add really.

Thanks in advance!

@jsguay-legion jsguay-legion added the feature New feature or request label Oct 21, 2022
@jsguay-legion
Copy link
Author

Closing, I opened this on the wrong account :/

@jsguay-legion jsguay-legion closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant