diff --git a/YACReaderLibrary/qml/GridComicsView6.qml b/YACReaderLibrary/qml/GridComicsView6.qml index d01a85c4..a8ced7fc 100644 --- a/YACReaderLibrary/qml/GridComicsView6.qml +++ b/YACReaderLibrary/qml/GridComicsView6.qml @@ -376,30 +376,38 @@ SplitView { comicsSelectionHelper.clear(); comicsSelectionHelper.selectIndex(index); grid.currentIndex = index; - ratingConextMenu.popup(); - } - } + ratingLoader.active = true; + ratingLoader.item.popup(); + } + } - Menu { - background: Rectangle { - implicitWidth: 42 - implicitHeight: 100 - //border.color: "#222" - //color: "#444" - } + Loader { + id: ratingLoader + active: false + sourceComponent: ratingConextMenuComponent + } - id: ratingConextMenu + Component { + id: ratingConextMenuComponent + Menu { + background: Rectangle { + implicitWidth: 42 + implicitHeight: 100 + } - Action { text: "1"; enabled: true; onTriggered: comicRatingHelper.rate(index,1) } - Action { text: "2"; enabled: true; onTriggered: comicRatingHelper.rate(index,2) } - Action { text: "3"; enabled: true; onTriggered: comicRatingHelper.rate(index,3) } - Action { text: "4"; enabled: true; onTriggered: comicRatingHelper.rate(index,4) } - Action { text: "5"; enabled: true; onTriggered: comicRatingHelper.rate(index,5) } + id: ratingConextMenu - delegate: MenuItem { - implicitHeight: 30 - } - } + Action { text: "1"; enabled: true; onTriggered: comicRatingHelper.rate(index,1) } + Action { text: "2"; enabled: true; onTriggered: comicRatingHelper.rate(index,2) } + Action { text: "3"; enabled: true; onTriggered: comicRatingHelper.rate(index,3) } + Action { text: "4"; enabled: true; onTriggered: comicRatingHelper.rate(index,4) } + Action { text: "5"; enabled: true; onTriggered: comicRatingHelper.rate(index,5) } + + delegate: MenuItem { + implicitHeight: 30 + } + } + } } //comic rating