You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a menu that contains a submenu in a section, a section change before or after the submenu will not cause a section break. As a result, the separator bar will not be displayed.
This has 5 "top level" menus; each of which is in a different section; Section 3 is a submenu. There should be a separator between each
Expected behavior
There should be a section separator line between "Action 2" and "Sub Menu", and between "Sub Menu" and "Action 5", as those three items are all in different sections.
Screenshots
macOS:
GTK:
Winforms:
Interestingly, GTK does draw the separator for the item after the menu, due to a slight discrepancy in how the menu is constructed.
Environment
Operating System: All desktop
Python version: Any (tested on 3.10)
Software versions:
Toga: 0.4.0
Logs
n/a
Additional context
The issue appears to lie in CommandSet.__iter__(). The logic for emitting GROUP_BREAK and SECTION_BREAK doesn't correctly account for cases where a group break is preceded or followed by a section break.
There is also an inconsistency in how menus are constructed on GTK.
The text was updated successfully, but these errors were encountered:
Describe the bug
If you have a menu that contains a submenu in a section, a section change before or after the submenu will not cause a section break. As a result, the separator bar will not be displayed.
Steps to reproduce
Generate a menu where
Reproduction case:
This has 5 "top level" menus; each of which is in a different section; Section 3 is a submenu. There should be a separator between each
Expected behavior
There should be a section separator line between "Action 2" and "Sub Menu", and between "Sub Menu" and "Action 5", as those three items are all in different sections.
Screenshots
macOS:
GTK:
Winforms:
Interestingly, GTK does draw the separator for the item after the menu, due to a slight discrepancy in how the menu is constructed.
Environment
Logs
n/a
Additional context
The issue appears to lie in
CommandSet.__iter__()
. The logic for emitting GROUP_BREAK and SECTION_BREAK doesn't correctly account for cases where a group break is preceded or followed by a section break.There is also an inconsistency in how menus are constructed on GTK.
The text was updated successfully, but these errors were encountered: