Fixed ability of manual resizing of popup menu on macOS.

This commit is contained in:
23rd 2022-11-26 18:12:52 +03:00
parent 0937ac0ad0
commit 6d7cb504ee

View file

@ -380,7 +380,16 @@ void PopupMenu::handleMenuResize() {
_scroll->resize(
newWidth - _padding.left() - _padding.right(),
scrollHeight);
resize(newWidth, _padding.top() + scrollHeight + _padding.bottom());
{
const auto newSize = QSize(
newWidth,
_padding.top() + scrollHeight + _padding.bottom());
if (::Platform::IsMac()) {
setMaximumSize(newSize);
setMinimumSize(newSize);
}
resize(newSize);
}
_inner = rect().marginsRemoved(_padding);
}