From 6d7cb504eebaf2afab103230d9760dfed47a1cc0 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 26 Nov 2022 18:12:52 +0300 Subject: [PATCH] Fixed ability of manual resizing of popup menu on macOS. --- ui/widgets/popup_menu.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/widgets/popup_menu.cpp b/ui/widgets/popup_menu.cpp index db6a97d..1b6b66b 100644 --- a/ui/widgets/popup_menu.cpp +++ b/ui/widgets/popup_menu.cpp @@ -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); }