ahiemstra created this revision. ahiemstra added reviewers: Kirigami, mart. Herald added a project: Kirigami. Herald added a subscriber: plasma-devel. ahiemstra requested review of this revision.
REVISION SUMMARY QQC2's Menu does not support icons, but the MenuItem that gets created when it is used as a submenu does. Since we already have a reference to that MenuItem, also update the MenuItem's icon property with those of the Action. This way submenus will properly display icons if set. TEST PLAN The following test code, ran through qmlscene, should produce a context menu with icons for both entries, even though one of them is a menu. Note that you will need D23499 <https://phabricator.kde.org/D23499> for the context menu button to show up again. import QtQuick 2.12 import QtQuick.Controls 2.12 import org.kde.kirigami 2.8 as Kirigami Kirigami.ApplicationWindow { pageStack.initialPage: Kirigami.Page { actions.main: Kirigami.Action { text: "Main"; icon.name: "document-new" } actions.contextualActions: [ Kirigami.Action { text: "Action 1"; icon.name: "document-new" }, Kirigami.Action { text: "Action 2" icon.name: "document-new" Kirigami.Action { text: "Nested Action" } } ] } } REPOSITORY R169 Kirigami BRANCH actionmenu_icons REVISION DETAIL https://phabricator.kde.org/D23501 AFFECTED FILES src/controls/private/ActionsMenu.qml To: ahiemstra, #kirigami, mart Cc: plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, apol, davidedmundson, mart, hein