1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Merge pull request #102251 from Hilderin/fix-slow-resize-embedded-game

Fix slow resize Embedded Game Window
This commit is contained in:
Thaddeus Crews
2025-02-03 11:14:41 -06:00
3 changed files with 35 additions and 23 deletions

View File

@@ -979,6 +979,11 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
game_size_label = memnew(Label());
main_menu_hbox->add_child(game_size_label);
game_size_label->hide();
// Setting the minimum size prevents the game workspace from resizing indefinitely
// due to the label size oscillating by a few pixels when the game is in stretch mode
// and the game workspace is at its minimum size.
game_size_label->set_custom_minimum_size(Size2(80 * EDSCALE, 0));
game_size_label->set_horizontal_alignment(HorizontalAlignment::HORIZONTAL_ALIGNMENT_RIGHT);
panel = memnew(Panel);
add_child(panel);