godot
godot copied to clipboard
Fix some inspector action buttons not updating icon when theme changes
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.
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 There is no such use case of inspector action button in the editor codebase.
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
Thanks!