Commit cc47b950 authored by Alex Nemeth's avatar Alex Nemeth Committed by Andreas Sturmlechner

Add translucent background attribute to desktop icon popup menu

Summary:
This fixes the issue when menu transparency is enabled in the Breeze widget settings the context menu of desktop icons have no transparency.
Multiple users (including me) have reported that D14174 did not solve the problem.

BUG: 395262

Test Plan:
Before:
{F6253280}

After:
{F6253279}

Reviewers: hein, davidedmundson, #plasma

Reviewed By: davidedmundson, #plasma

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15435
parent a4c72417
......@@ -1818,6 +1818,9 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
} else {
m_menuPosition = QCursor::pos();
}
menu->setAttribute(Qt::WA_TranslucentBackground);
menu->winId(); //force surface creation before ensurePolish call in menu::Popup which happens before show
menu->popup(m_menuPosition);
connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment