Skip to content

Commit fd02ff8

Browse files
committed
Merge pull request #104703 from bruvzg/loc_dir_icons
Fix updating editor icons on translation change.
2 parents 1a367f3 + e47207a commit fd02ff8

File tree

7 files changed

+30
-1
lines changed

7 files changed

+30
-1
lines changed

editor/code_editor.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ void FindReplaceBar::_notification(int p_what) {
144144
_update_toggle_replace_button(replace_text->is_visible_in_tree());
145145
} break;
146146

147+
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
148+
case NOTIFICATION_TRANSLATION_CHANGED: {
149+
_update_toggle_replace_button(replace_text->is_visible_in_tree());
150+
} break;
151+
147152
case NOTIFICATION_VISIBILITY_CHANGED: {
148153
set_process_input(is_visible_in_tree());
149154
} break;
@@ -1649,6 +1654,13 @@ void CodeTextEditor::_notification(int p_what) {
16491654
_update_text_editor_theme();
16501655
} break;
16511656

1657+
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
1658+
case NOTIFICATION_TRANSLATION_CHANGED: {
1659+
if (toggle_scripts_button->is_visible()) {
1660+
update_toggle_scripts_button();
1661+
}
1662+
} break;
1663+
16521664
case NOTIFICATION_VISIBILITY_CHANGED: {
16531665
if (toggle_scripts_button->is_visible()) {
16541666
update_toggle_scripts_button();

editor/editor_dock_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,8 @@ EditorDockManager::EditorDockManager() {
856856

857857
void DockContextPopup::_notification(int p_what) {
858858
switch (p_what) {
859+
case Control::NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
860+
case NOTIFICATION_TRANSLATION_CHANGED:
859861
case NOTIFICATION_THEME_CHANGED: {
860862
if (make_float_button) {
861863
make_float_button->set_button_icon(get_editor_theme_icon(SNAME("MakeFloating")));

editor/editor_help.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3236,6 +3236,8 @@ void EditorHelp::_notification(int p_what) {
32363236
update_toggle_scripts_button();
32373237
} break;
32383238

3239+
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
3240+
case NOTIFICATION_TRANSLATION_CHANGED:
32393241
case NOTIFICATION_VISIBILITY_CHANGED: {
32403242
update_toggle_scripts_button();
32413243
} break;

editor/gui/editor_scene_tabs.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ void EditorSceneTabs::_notification(int p_what) {
6767
_scene_tabs_resized();
6868
}
6969
} break;
70+
71+
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
72+
case NOTIFICATION_TRANSLATION_CHANGED: {
73+
_scene_tabs_resized();
74+
} break;
7075
}
7176
}
7277

editor/gui/editor_spin_slider.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ void EditorSpinSlider::_notification(int p_what) {
457457
_update_value_input_stylebox();
458458
} break;
459459

460+
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
461+
case NOTIFICATION_TRANSLATION_CHANGED:
460462
case NOTIFICATION_THEME_CHANGED: {
461463
_update_value_input_stylebox();
462464
} break;

editor/plugins/control_editor_plugin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ void ControlPositioningWarning::gui_input(const Ref<InputEvent> &p_event) {
104104

105105
void ControlPositioningWarning::_notification(int p_notification) {
106106
switch (p_notification) {
107-
case NOTIFICATION_ENTER_TREE:
107+
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
108+
case NOTIFICATION_TRANSLATION_CHANGED:
108109
case NOTIFICATION_THEME_CHANGED:
109110
_update_warning();
110111
_update_toggler();

editor/plugins/sprite_frames_editor_plugin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,11 @@ void SpriteFramesEditor::_notification(int p_what) {
672672
_update_show_settings();
673673
} break;
674674

675+
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
676+
case NOTIFICATION_TRANSLATION_CHANGED: {
677+
_update_show_settings();
678+
} break;
679+
675680
case NOTIFICATION_READY: {
676681
add_theme_constant_override("autohide", 1); // Fixes the dragger always showing up.
677682
} break;

0 commit comments

Comments
 (0)