on xenial help sign in
isCurrent only for menus menus and not for indicator menus
0b49051Albert Astals Cid
qml/Panel/Panel.qml+7−1
@@ -290,9 +290,15 @@ Item {
290 }
290 }
291
291
292 pageDelegate: PanelMenuPage {
292 pageDelegate: PanelMenuPage {
293+ property bool isCurrent: modelIndex == __applicationMenus.currentMenuIndexChanged
294+ onIsCurrentChanged: {
295+ if (isCurrent && menuModel && submenuIndex) {
296+ menuModel.aboutToShow(submenuIndex);
297+ }
298+ }
299+
293 menuModel: __applicationMenus.model
300 menuModel: __applicationMenus.model
294 submenuIndex: modelIndex
301 submenuIndex: modelIndex
295− isCurrent: modelIndex == __applicationMenus.currentMenuIndexChanged
296
302
297 factory: ApplicationMenuItemFactory {
303 factory: ApplicationMenuItemFactory {
298 rootModel: __applicationMenus.model
304 rootModel: __applicationMenus.model
qml/Panel/PanelMenuPage.qml−7
@@ -27,13 +27,6 @@ PageStack {
27 property var submenuIndex: undefined
27 property var submenuIndex: undefined
28 property QtObject menuModel: null
28 property QtObject menuModel: null
29 property Component factory
29 property Component factory
30− property bool isCurrent: false
31−
32− onIsCurrentChanged: {
33− if (isCurrent && menuModel && submenuIndex) {
34− menuModel.aboutToShow(submenuIndex);
35− }
36− }
37
30
38 Connections {
31 Connections {
39 id: dynamicChanges
32 id: dynamicChanges