Respect real title height in WindowHelper on macOS.

This commit is contained in:
John Preston 2023-02-28 16:18:17 +04:00
parent d2fddd8da6
commit 0b87868b1d

View file

@ -383,11 +383,11 @@ void WindowHelper::updateCustomTitleVisibility(bool force) {
}
void WindowHelper::setMinimumSize(QSize size) {
window()->setMinimumSize(size.width(), _title->height() + size.height());
window()->setMinimumSize(size.width(), frameMargins().top() + size.height());
}
void WindowHelper::setFixedSize(QSize size) {
window()->setFixedSize(size.width(), _title->height() + size.height());
window()->setFixedSize(size.width(), frameMargins().top() + size.height());
}
void WindowHelper::setStaysOnTop(bool enabled) {
@ -395,7 +395,7 @@ void WindowHelper::setStaysOnTop(bool enabled) {
}
void WindowHelper::setGeometry(QRect rect) {
window()->setGeometry(rect.marginsAdded({ 0, _title->height(), 0, 0 }));
window()->setGeometry(rect.marginsAdded(frameMargins()));
}
void WindowHelper::setupBodyTitleAreaEvents() {