godot icon indicating copy to clipboard operation
godot copied to clipboard

Fix some inspector action buttons not updating icon when theme changes

Open timothyqiu opened this issue 5 months ago • 2 comments
trafficstars

This PR adds a EditorInspectorActionButton class to replace create_inspector_action_button(). Thus action button users don't have to add icon updating logic on-site.

timothyqiu avatar Jun 12 '25 03:06 timothyqiu

If the point of this is to update the icon automatically, it could make sense to have the p_text argument be optional so you can create a button with just an icon.

lodetrick avatar Jun 12 '25 03:06 lodetrick

@lodetrick There is no such use case of inspector action button in the editor codebase.

timothyqiu avatar Jun 12 '25 03:06 timothyqiu

Updated to use TTRC() for button text.

The only exception is this one, I did not add NOTIFICATION_TRANSLATION_CHANGED because usually auto-translation won't take place for this property editor.

https://github.com/godotengine/godot/blob/2cd3957524574cb2476f710aa5ebd8807011ac90/editor/plugins/font_config_plugin.cpp#L295-L303

timothyqiu avatar Jun 25 '25 07:06 timothyqiu

Thanks!

Repiteo avatar Aug 04 '25 17:08 Repiteo