Explorar el Código

Fix PopupMenu's maximum height not being automatically set

Ricardo Subtil hace 2 años
padre
commit
7fdfed2a9e
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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;
 	}