BWindow: fix copypasta in ResizeToPreferred

If you had problems with a window picking an incorrect height when using
the layout system, this could very well be why.
This commit is contained in:
Adrien Destugues
2021-07-25 17:47:36 +02:00
parent b5a859ad62
commit 8df6e5c2a6
+2 -2
View File
@@ -2455,8 +2455,8 @@ BWindow::ResizeToPreferred()
width = std::max(width, fTopView->MinSize().width);
float height = fTopView->PreferredSize().height;
height = std::min(width, fTopView->MaxSize().height);
height = std::max(width, fTopView->MinSize().height);
height = std::min(height, fTopView->MaxSize().height);
height = std::max(height, fTopView->MinSize().height);
if (GetLayout()->HasHeightForWidth())
GetLayout()->GetHeightForWidth(width, NULL, NULL, &height);