From 628d3b9ab6443acd352617ac78cc3131ba41dbbc Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 5 Feb 2020 18:49:17 +0400 Subject: [PATCH] Improve transparent popup menus. --- ui/widgets/menu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/widgets/menu.cpp b/ui/widgets/menu.cpp index 2597c47..2605a8a 100644 --- a/ui/widgets/menu.cpp +++ b/ui/widgets/menu.cpp @@ -263,6 +263,9 @@ void Menu::paintEvent(QPaintEvent *e) { } else { auto enabled = action->isEnabled(); auto selected = ((i == _selected || i == _pressed) && enabled); + if (selected && _st.itemBgOver->c.alpha() < 255) { + p.fillRect(0, 0, width(), actionHeight, _st.itemBg); + } p.fillRect(0, 0, width(), actionHeight, selected ? _st.itemBgOver : _st.itemBg); if (data.ripple) { data.ripple->paint(p, 0, 0, width());