wasm: Respect maximum window size in QWasmWindow
Currently we are only checking if windowMinimumSize is not violated, and we dont check windowMaximumSize at all, which may results in windows being bigger than they ought to be. When the sizeHints are updated, call the setGeometry() function which makes sure that size constraints are respected and will resize window if needed. Pick-to: 6.5 Change-Id: I703bddec85ba6e02eea74a39e06d1f70d59e1677 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 969bef94549d5bceacd68f7524ce9122d5c7ccae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b1d277ddfd
commit
18ff5201c9
@ -361,12 +361,8 @@ WId QWasmWindow::winId() const
|
||||
|
||||
void QWasmWindow::propagateSizeHints()
|
||||
{
|
||||
QRect rect = windowGeometry();
|
||||
if (rect.size().width() < windowMinimumSize().width()
|
||||
&& rect.size().height() < windowMinimumSize().height()) {
|
||||
rect.setSize(windowMinimumSize());
|
||||
setGeometry(rect);
|
||||
}
|
||||
// setGeometry() will take care of minimum and maximum size constraints
|
||||
setGeometry(windowGeometry());
|
||||
m_nonClientArea->propagateSizeHints();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user