godot icon indicating copy to clipboard operation
godot copied to clipboard

Allow setting editor dock tabs to icon only

Open timothyqiu opened this issue 1 year ago • 8 comments

Proof of concept of this tweet.

  • Adds editor setting interface/editor/dock_tab_style to 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.

Peek 2024-04-23 10-29

~~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

timothyqiu avatar Apr 23 '24 03:04 timothyqiu

Looks nice

image

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)

passivestar avatar Apr 23 '24 08:04 passivestar

@timothyqiu Will there be option to display those icons on left, right side (like in blender) or at bottom ?

Jeremi360 avatar Apr 23 '24 09:04 Jeremi360

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.

timothyqiu avatar Apr 23 '24 09:04 timothyqiu

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

passivestar avatar Apr 23 '24 09:04 passivestar

Restoring layout should correctly apply tab style now :)

timothyqiu avatar Apr 23 '24 10:04 timothyqiu

Restoring layout should correctly apply tab style now :)

Yep, both switching the layout and restarting the editor now works 👍

passivestar avatar Apr 23 '24 10:04 passivestar

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

Jeremi360 avatar Apr 24 '24 05:04 Jeremi360

Custom icons need to be resized. image

KoBeWi avatar Apr 25 '24 18:04 KoBeWi

Thanks! Looking forward to seeing how users like it :tada:

akien-mga avatar May 08 '24 12:05 akien-mga