From f5cdf4bdb81253cbaef13dfd913154a941165d3f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 8 Aug 2022 04:10:04 +0400 Subject: [PATCH] Provide menu shadow size to the system --- ui/widgets/popup_menu.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/widgets/popup_menu.cpp b/ui/widgets/popup_menu.cpp index 75cd2c0..dd6d3bf 100644 --- a/ui/widgets/popup_menu.cpp +++ b/ui/widgets/popup_menu.cpp @@ -302,6 +302,13 @@ void PopupMenu::handleCompositingUpdate() { _padding = _useTransparency ? _st.shadow.extend : style::margins(line, line, line, line); + if (windowHandle()) { + if (_useTransparency) { + Platform::SetWindowExtents(this, _padding); + } else { + Platform::UnsetWindowExtents(this); + } + } _scroll->moveToLeft(_padding.left(), _padding.top()); handleMenuResize(); updateRoundingOverlay();