Use setFixedSize for popup menu and tooltip

This commit is contained in:
Ilya Fedin 2023-11-19 01:23:55 +04:00 committed by John Preston
parent 89d664b6f7
commit 1d1c524b2c
2 changed files with 4 additions and 6 deletions

View file

@ -383,10 +383,7 @@ void PopupMenu::handleMenuResize() {
const auto newSize = QSize(
newWidth,
_padding.top() + scrollHeight + _padding.bottom());
if (::Platform::IsMac()) {
setFixedSize(newSize);
}
resize(newSize);
setFixedSize(newSize);
}
_inner = rect().marginsRemoved(_padding);
}

View file

@ -137,7 +137,8 @@ void Tooltip::popup(const QPoint &m, const QString &text, const style::Tooltip *
}
}
setGeometry(QRect(p, s));
move(p);
setFixedSize(s);
_hideByLeaveTimer.cancel();
show();
@ -234,7 +235,7 @@ void ImportantTooltip::resizeToContent() {
if (size.width() < 2 * (_st.arrowSkipMin + _st.arrow)) {
size.setWidth(2 * (_st.arrowSkipMin + _st.arrow));
}
resize(size);
setFixedSize(size);
updateGeometry();
}