diff options
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index f7d8fbb15c..cef2941010 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -138,22 +138,27 @@ bool Control::_set(const StringName& p_name, const Variant& p_value) { if (name.begins_with("custom_icons/")) { String dname = name.get_slice("/",1); data.icon_override.erase(dname); + notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_styles/")) { String dname = name.get_slice("/",1); data.style_override.erase(dname); + notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_fonts/")) { String dname = name.get_slice("/",1); data.font_override.erase(dname); + notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_colors/")) { String dname = name.get_slice("/",1); data.color_override.erase(dname); + notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_constants/")) { String dname = name.get_slice("/",1); data.constant_override.erase(dname); + notification(NOTIFICATION_THEME_CHANGED); update(); } else return false; @@ -161,19 +166,24 @@ bool Control::_set(const StringName& p_name, const Variant& p_value) { } else { if (name.begins_with("custom_icons/")) { String dname = name.get_slice("/",1); + notification(NOTIFICATION_THEME_CHANGED); add_icon_override(dname,p_value); } else if (name.begins_with("custom_styles/")) { String dname = name.get_slice("/",1); add_style_override(dname,p_value); + notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_fonts/")) { String dname = name.get_slice("/",1); add_font_override(dname,p_value); + notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_colors/")) { String dname = name.get_slice("/",1); add_color_override(dname,p_value); + notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_constants/")) { String dname = name.get_slice("/",1); add_constant_override(dname,p_value); + notification(NOTIFICATION_THEME_CHANGED); } else return false; } |