Kaynağa Gözat

Fix some menu bar items unresponsive after language change

Haoyu Qiu 1 ay önce
ebeveyn
işleme
51e8b5947f
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      scene/gui/menu_bar.cpp

+ 6 - 0
scene/gui/menu_bar.cpp

@@ -320,12 +320,18 @@ void MenuBar::_notification(int p_what) {
 					}
 				}
 			}
+			if (!is_global) {
+				update_minimum_size();
+			}
 		} break;
 		case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
 		case NOTIFICATION_THEME_CHANGED: {
 			for (int i = 0; i < menu_cache.size(); i++) {
 				shape(menu_cache.write[i]);
 			}
+			if (global_menu_tag.is_empty()) {
+				update_minimum_size();
+			}
 		} break;
 		case NOTIFICATION_VISIBILITY_CHANGED: {
 			if (is_native_menu()) {