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
Game launcher frontend, which constantly loads and uses user supplied assets in it's UI nodes
Describe the problem or limitation you are having in your project
OptionMenu has an option to expand icon size. Together with a custom minimum size, developers can tweak the final icon size to their needs. However PopupMenu doesn't offer such option, so icons display at their original resolution, which looks bad:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Major improvements have been made (godotengine/godot#41640) to PopupMenu's usability, and I believe this issue is one of the last long standing nuisances of it. In a similar vein to the implemented max_size property, there should be a way to define a given menu item's maximum size. It's not enough to just add an "Expand Icon" option to it, as the icon can become too small due to the text size. Like with OptionButton, there should be a way to specify some minimum size:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
For PopupMenu:
Add a max_item_size Vector2 property that controls the maximum size for a menu item.
It should still respect minimum size requirements (e.g. for text), in which case the final size would be bigger than requested
For OptionButton:
Add an expand_item_to_size bool setting, that will set the maximum size of menu item's to the control's minimum size. This makes all menu items have the same size as the button itself, which looks better.
If another size is desired, it would still be possible to set it in code:
Describe the project you are working on
Game launcher frontend, which constantly loads and uses user supplied assets in it's UI nodes
Describe the problem or limitation you are having in your project
OptionMenu
has an option to expand icon size. Together with a custom minimum size, developers can tweak the final icon size to their needs. HoweverPopupMenu
doesn't offer such option, so icons display at their original resolution, which looks bad:Describe the feature / enhancement and how it helps to overcome the problem or limitation
Major improvements have been made (godotengine/godot#41640) to
PopupMenu
's usability, and I believe this issue is one of the last long standing nuisances of it. In a similar vein to the implementedmax_size
property, there should be a way to define a given menu item's maximum size. It's not enough to just add an "Expand Icon" option to it, as the icon can become too small due to the text size. Like withOptionButton
, there should be a way to specify some minimum size:Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
For
PopupMenu
:max_item_size
Vector2 property that controls the maximum size for a menu item.For
OptionButton
:expand_item_to_size
bool setting, that will set the maximum size of menu item's to the control's minimum size. This makes all menu items have the same size as the button itself, which looks better.If this enhancement will not be used often, can it be worked around with a few lines of script?
AFAIK there's no way to change icon sizes of
PopupMenu
s from scripts.Is there a reason why this should be core and not an add-on in the asset library?
Modifies core behavior
The text was updated successfully, but these errors were encountered: