Procházet zdrojové kódy

Fix PopupMenu's maximum height not being automatically set

Ricardo Subtil před 2 roky
rodič
revize
7fdfed2a9e
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      scene/gui/popup_menu.cpp

+ 2 - 0
scene/gui/popup_menu.cpp

@@ -100,6 +100,8 @@ Size2 PopupMenu::get_minimum_size() const {
 		minsize.width += check_w;
 	}
 
+	minsize.height = MIN(minsize.height, OS::get_singleton()->get_window_size().height);
+
 	if (max_height > 0 && minsize.height > max_height) {
 		minsize.height = max_height;
 	}