egui icon indicating copy to clipboard operation
egui copied to clipboard

nested submenus at screen edge will overlap

Open nacl42 opened this issue 1 year ago • 0 comments

Submenus are usually created to the right side of the parent menu: proper_submenus

If the right screen edge is hit, then the submenus will be placed with their right edge matching the screen edge: overlaid_submenus

In the shown example this will cause a not so optimal appearance, i.e. the submenu will partially cover the parent menu.

If the submenu has a long text, this will cause the submenu to fully overlap the parent menu. This will effectively prohibit the user to move on to the next item in the parent menu, as it is covered and not accessible. I therefore consider this behavior a bug.

This is an example from my application: full_overlap

Expected behavior If the space between the right edge of the parent menu and the screen is smaller than the width of the submenu, then the submenu should be displayed to the left side of the parent menu.

It could look similar to this: exptected_appearance

I checked with LibreOffice and other applications and it seems a common way to handle this.

I would really appreciate any help on this subject, as this is an annoying behavior in my application. Thank you!

nacl42 avatar Oct 11 '24 19:10 nacl42