Bound the suggested floating window geometry

Because why not, seems correct. No bug would happen with QtWidgets
since QtWidgets respect the min sizes of their children, but for
QtQuick it's more flaky as there's no intrinsic mechanism for
min sizes, so give it some help
This commit is contained in:
Sergio Martins
2022-06-10 14:13:03 +01:00
parent 8e85e46ee9
commit a94daba3fc

View File

@@ -540,6 +540,7 @@ Controllers::FloatingWindow *DockWidget::Private::morphIntoFloatingWindow()
auto frame = new Controllers::Frame();
frame->addWidget(q);
geo.setSize(geo.size().boundedTo(frame->view()->maxSizeHint()));
geo.setSize(geo.size().expandedTo(frame->view()->minSize()));
Controllers::FloatingWindow::ensureRectIsOnScreen(geo);
auto floatingWindow = new Controllers::FloatingWindow(frame, geo);
floatingWindow->view()->show();