-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add a toolbar container ("overflow menu") #386
Comments
I like the idea, it's a simple way to solve the problem we have right now without implementing a flow layout system. I don't think a ToolbarItemGroup as you describe it is needed though, it makes things more complex than what is actually needed I think. |
The menu mode thing I described for I think explicit grouping (in contrast to inserting separators manually) makes it easy to implement new features. For example, the group highlighting mentioned in #14 (comment) can just be a property of |
I think the conversation derived from the original subject to how to copy blender's UI, which wasn't great at all, even if they get a new UI overhaul. |
This is with the font size reduced to 12: This is with the font size reduced to 10: Font size reduced to 8: And I can finally see they didn't pay attention to people talking about animating Controls inside Containers (I mean, Rect Position is hidden, so I can't make a track for it for the AnimationPlayer, but that is not about this proposal). |
It's a toolbar for the viewport, not for the animation panel.
The animation panel toolbar is equally huge and adding more to it would result in the same ultimate issue. In any case, we use the FlowContainer now, so overflow is getting wrapped, and this is less of an issue. |
What does it means? It creates a second line in the toolbar? |
Yes. |
Describe the project you are working on: Just playing around trying to find & fix bugs
Describe the problem or limitation you are having in your project:
Editor's toolbar can end up with lots of buttons. Currently, it uses a
HBoxContainer
as toolbar. To keep all the buttons visible, it even pushes dock panels out of the window frame:The window in the screenshot is maximized. The inspector is pushed off the window.
Describe how this feature / enhancement will help you overcome this problem or limitation:
A toolbar container does not have to make all its children visible, it can have a much smaller minimum width.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
If there is not enough space to show all the buttons on the toolbar, the extra buttons can be put into an overflow menu, as its menu items. (like an Android toolbar / extension toolbar on Chrome.)
Describe implementation detail for your proposal (in code), if possible:
ToolbarContainer
is like anHBoxContainer
with a hidden trailing overflow menu button. When the container is resized to its minimum size, it only shows the overflow button. The container's children are usuallyToolbarItem
s.ToolbarItem
creates an button when on the toolbar, and creates a menu item when in the overflow menu.Additionally, a
ToolbarItemGroup
can be added to groupToolbarItem
s. It has three menu modes:always
: shows an overflow menu button on the toolbar, or a submenu in the overflow menunever
: shows a divider separated group of buttons on the toolbar, or a divider separated group of menu options in the overflow menuauto
: default, one of the above two behaviors depending the available spaceThere are existing overflow menus that are added manually. For example:
The layout in the above screenshot may be implemented as something like this: (shown in XML for easy display of hierarchy)
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Seems not achievable using only a few lines of script.
Is there a reason why this should be core and not an add-on in the asset library?:
Editor can make use of this container for toolbar.
The text was updated successfully, but these errors were encountered: