Allow setting editor dock tabs to icon only
Proof of concept of this tweet.
- Adds editor setting
interface/editor/dock_tab_styleto control dock tabs to be Text Only, Icon Only, or Text and Icon. - Adds
EditorPlugin.set_dock_tab_icon(control, icon)so plugins can also set their icons, and possibly update the icon when theme changes.
~~Marking as draft as this PR is waiting for the tooltip feature from #89247 (needed for Icon Only mode).~~
p.s. It's technically possible to set tab style per dock slot (e.g. use Icon Only for docks on the right side while keep Text Only for docks on the left side). But I'm not sure where to put the toggle. The three-dots menu for each slot is currently used as a context menu for the active tab in that slot.
Closes https://github.com/godotengine/godot-proposals/issues/9579
Looks nice
Now that I see it, it actually doesn't look that weird in icon-only even when there's only one or two tabs in a slot (a concern that @akien-mga raised on twitter). But in reality this will likely be used mostly by laptop users such as myself, and often they'll have more than a couple tabs, especially in the future when more editor addons appear
I can definitely see myself using this
By the way this currently doesn't seem to survive the editor restart or layout load from a saved preset (goes back to being only text)
@timothyqiu Will there be option to display those icons on left, right side (like in blender) or at bottom ?
By the way this currently doesn't seem to survive the editor restart or layout load from a saved preset (goes back to being only text)
@passivestar Ah yes, it currently does missing some setup for loading from layout. Thanks for the feedback!
However the setting should have survived editor restart. Could it be related to the current bug that switching between editor versions resets editor settings?
Will there be option to display those icons on left, right side (like in blender) or at bottom ?
@Jeremi360 That's out of the scope of this PR though. It has to be implemented first for TabContainer. See https://github.com/godotengine/godot-proposals/issues/1986.
However the setting should have survived editor restart. Could it be related to the current bug that switching between editor versions resets editor settings?
The editor setting itself does survive the restart (I still see "Icon Only" there). But when I start the editor I first see some frames of the default layout while it's loading (that have icon-only), but then when it's done loading it also switches the layout to my own one, and that's when it goes back to text. So it appears to be a part of the same problem
Restoring layout should correctly apply tab style now :)
Restoring layout should correctly apply tab style now :)
Yep, both switching the layout and restarting the editor now works 👍
That's out of the scope of this PR though. It has to be implemented first for
TabContainer. See godotengine/godot-proposals#1986.
I see. @timothyqiu
Custom icons need to be resized.
Thanks! Looking forward to seeing how users like it :tada: