on xenial help sign in
isCurrent only for menus menus and not for indicator menus
commit0b4905165909aee9820d99e8a6f8d4ebdf746150 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 7 Mar 2017, 11:41 (10 years ago) parentd25c175
2 files changed+7−8
qml/Panel/Panel.qml+7−1 qml/Panel/PanelMenuPage.qml−7
qml/Panel/Panel.qml+7−1
@@ -290,9 +290,15 @@ Item {
290290 }
291291
292292 pageDelegate: PanelMenuPage {
293+ property bool isCurrent: modelIndex == __applicationMenus.currentMenuIndexChanged
294+ onIsCurrentChanged: {
295+ if (isCurrent && menuModel && submenuIndex) {
296+ menuModel.aboutToShow(submenuIndex);
297+ }
298+ }
299+
293300 menuModel: __applicationMenus.model
294301 submenuIndex: modelIndex
295− isCurrent: modelIndex == __applicationMenus.currentMenuIndexChanged
296302
297303 factory: ApplicationMenuItemFactory {
298304 rootModel: __applicationMenus.model
qml/Panel/PanelMenuPage.qml−7
@@ -27,13 +27,6 @@ PageStack {
2727 property var submenuIndex: undefined
2828 property QtObject menuModel: null
2929 property Component factory
30− property bool isCurrent: false
31−
32− onIsCurrentChanged: {
33− if (isCurrent && menuModel && submenuIndex) {
34− menuModel.aboutToShow(submenuIndex);
35− }
36− }
3730
3831 Connections {
3932 id: dynamicChanges