diff --git a/YACReaderLibrary/qml/GridComicsView.qml b/YACReaderLibrary/qml/GridComicsView.qml
index fd533fe0..b000c95e 100644
--- a/YACReaderLibrary/qml/GridComicsView.qml
+++ b/YACReaderLibrary/qml/GridComicsView.qml
@@ -345,36 +345,8 @@ Rectangle {
}
//rating icon
- Image {
- id: ratingImage
- anchors {bottom: realCell.bottom; right: pageImage.left; bottomMargin: 5; rightMargin: Math.floor(pages.width)+12}
- source: "star.png"
- width: 13
- height: 11
+ RatingContextMenu {
- MouseArea {
- anchors.fill: parent
- onPressed: {
- console.log("rating");
- comicsSelectionHelper.clear();
- comicsSelectionHelper.selectIndex(index);
- grid.currentIndex = index;
- ratingConextMenu.popup();
- }
- }
-
- MenuBar
- {
- Menu {
- id: ratingConextMenu
- MenuItem { text: "1"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,1) }
- MenuItem { text: "2"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,2) }
- MenuItem { text: "3"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,3) }
- MenuItem { text: "4"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,4) }
- MenuItem { text: "5"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,5) }
-
- }
- }
}
//comic rating
diff --git a/YACReaderLibrary/qml/RatingContextMenu-osx.qml b/YACReaderLibrary/qml/RatingContextMenu-osx.qml
new file mode 100644
index 00000000..6f6bb515
--- /dev/null
+++ b/YACReaderLibrary/qml/RatingContextMenu-osx.qml
@@ -0,0 +1,32 @@
+import QtQuick 2.9
+
+import QtQuick.Controls 1.4
+
+Image {
+ id: ratingImage
+ anchors {bottom: realCell.bottom; right: pageImage.left; bottomMargin: 5; rightMargin: Math.floor(pages.width)+12}
+ source: "star.png"
+ width: 13
+ height: 11
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ console.log("rating");
+ comicsSelectionHelper.clear();
+ comicsSelectionHelper.selectIndex(index);
+ grid.currentIndex = index;
+ ratingConextMenu.popup();
+ }
+ }
+
+ Menu {
+ id: ratingConextMenu
+ MenuItem { text: "1"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,1) }
+ MenuItem { text: "2"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,2) }
+ MenuItem { text: "3"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,3) }
+ MenuItem { text: "4"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,4) }
+ MenuItem { text: "5"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,5) }
+ }
+}
+
diff --git a/YACReaderLibrary/qml/RatingContextMenu-win.qml b/YACReaderLibrary/qml/RatingContextMenu-win.qml
new file mode 100644
index 00000000..4fb75186
--- /dev/null
+++ b/YACReaderLibrary/qml/RatingContextMenu-win.qml
@@ -0,0 +1,36 @@
+import QtQuick 2.9
+
+import QtQuick.Controls 1.4
+
+Image {
+ id: ratingImage
+ anchors {bottom: realCell.bottom; right: pageImage.left; bottomMargin: 5; rightMargin: Math.floor(pages.width)+12}
+ source: "star.png"
+ width: 13
+ height: 11
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ console.log("rating");
+ comicsSelectionHelper.clear();
+ comicsSelectionHelper.selectIndex(index);
+ grid.currentIndex = index;
+ ratingConextMenu.popup();
+ }
+ }
+
+ MenuBar
+ {
+ Menu {
+ id: ratingConextMenu
+ MenuItem { text: "1"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,1) }
+ MenuItem { text: "2"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,2) }
+ MenuItem { text: "3"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,3) }
+ MenuItem { text: "4"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,4) }
+ MenuItem { text: "5"; enabled: true; iconSource:"star_menu.png"; onTriggered: comicRatingHelper.rate(index,5) }
+
+ }
+ }
+}
+
diff --git a/YACReaderLibrary/qml_osx.qrc b/YACReaderLibrary/qml_osx.qrc
index 1649991a..76dc6a07 100644
--- a/YACReaderLibrary/qml_osx.qrc
+++ b/YACReaderLibrary/qml_osx.qrc
@@ -4,5 +4,6 @@
qml/page-macosx@2x.png
qml/star-macosx.png
qml/star-macosx@2x.png
+ qml/RatingContextMenu-osx.qml
diff --git a/YACReaderLibrary/qml_win.qrc b/YACReaderLibrary/qml_win.qrc
index 59e2872f..3125c878 100644
--- a/YACReaderLibrary/qml_win.qrc
+++ b/YACReaderLibrary/qml_win.qrc
@@ -2,5 +2,6 @@
qml/page.png
qml/star.png
+ qml/RatingContextMenu-win.qml