瀏覽代碼

Merge pull request #106813 from bruvzg/tr_noti

Add missing `TRANSLATION_CHANGED` notifications.
Rémi Verschelde 3 月之前
父節點
當前提交
68349be895
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      scene/gui/menu_button.cpp
  2. 1 0
      scene/gui/popup.cpp

+ 1 - 0
scene/gui/menu_button.cpp

@@ -134,6 +134,7 @@ void MenuButton::_notification(int p_what) {
 			DisplayServer::get_singleton()->accessibility_update_set_popup_type(ae, DisplayServer::AccessibilityPopupType::POPUP_MENU);
 			DisplayServer::get_singleton()->accessibility_update_set_popup_type(ae, DisplayServer::AccessibilityPopupType::POPUP_MENU);
 		} break;
 		} break;
 
 
+		case NOTIFICATION_TRANSLATION_CHANGED:
 		case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
 		case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
 			popup->set_layout_direction((Window::LayoutDirection)get_layout_direction());
 			popup->set_layout_direction((Window::LayoutDirection)get_layout_direction());
 		} break;
 		} break;

+ 1 - 0
scene/gui/popup.cpp

@@ -387,6 +387,7 @@ void PopupPanel::_notification(int p_what) {
 #endif
 #endif
 		} break;
 		} break;
 
 
+		case Control::NOTIFICATION_TRANSLATION_CHANGED:
 		case Control::NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
 		case Control::NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
 			if (is_visible()) {
 			if (is_visible()) {
 				_update_shadow_offsets();
 				_update_shadow_offsets();