mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 00:44:59 -04:00
added rating support to comics grid view
This commit is contained in:
@ -77,7 +77,6 @@ Rectangle {
|
||||
|
||||
comicsSelectionHelper.selectIndex(index)
|
||||
grid.currentIndex = index;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,7 +186,30 @@ Rectangle {
|
||||
id: ratingImage
|
||||
anchors {bottom: realCell.bottom; right: pageImage.left; bottomMargin: 5; rightMargin: Math.floor(pages.width)+12}
|
||||
source: "star.png"
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
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) }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//comic rating
|
||||
Text {
|
||||
id: comicRating
|
||||
|
BIN
YACReaderLibrary/qml/star_menu.png
Normal file
BIN
YACReaderLibrary/qml/star_menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 277 B |
Reference in New Issue
Block a user