Opened 5 years ago

Last modified 17 months ago

#15782 new enhancement

Implement relayouting of submenus if menu is changed

Reported by: X512 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit/BMenu Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by X512)

This hrev53937.

When menu is changed by inserting or removing items and submenu is open, menu size can change become inconsistent with submenu position. We may need to recursively relayout submenus when menu size is changed or menu is scrolled. Note that submenus relayouting is not trivial, just reposition can cause submenus going outside of screen. Screen height submenus with scrollers should be not moved vertically. When changed menu width increase, submenus may go out of screen horizontally and need to change open direction.

As I understand, other OS do not implement this feature and I am not sure that it is required as it can be annoying. This feature need to be discussed.

Situation in Windows: https://stackoverflow.com/questions/13224099/how-to-update-context-menu-already-displayed-with-trackpopupmenu-in-c/13224228.

Change History (5)

comment:1 by X512, 5 years ago

Implementation in https://review.haiku-os.org/c/haiku/+/2309 is not enough because it not take in account possibility of going submenus out of screen when moving.

comment:2 by X512, 5 years ago

Simple approach to solve issue can be just close submenus when menu is changed.

comment:3 by X512, 5 years ago

Description: modified (diff)

comment:5 by pulkomandy, 17 months ago

Component: Kits/Interface KitKits/Interface Kit/BMenu
Note: See TracTickets for help on using tickets.