mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
Enabled context menut and double click for opening in comic info view.
This commit is contained in:
@ -6,6 +6,8 @@ import QtGraphicalEffects 1.0
|
||||
import com.yacreader.ComicModel 1.0
|
||||
|
||||
Rectangle {
|
||||
id: main
|
||||
|
||||
property url backgroundImageURL;
|
||||
|
||||
property real backgroundBlurRadius : 100; //85;
|
||||
@ -163,8 +165,23 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onClicked: {
|
||||
hoverEnabled: true
|
||||
|
||||
onDoubleClicked: {
|
||||
list.currentIndex = index;
|
||||
currentIndexHelper.selectedItem(index);
|
||||
}
|
||||
|
||||
onReleased: {
|
||||
list.currentIndex = index;
|
||||
|
||||
if(mouse.button === Qt.RightButton) // context menu is requested
|
||||
{
|
||||
var coordinates = main.mapFromItem(coverElement,mouseX,mouseY)
|
||||
contextMenuHelper.requestedContextMenu(Qt.point(coordinates.x,coordinates.y));
|
||||
}
|
||||
|
||||
mouse.accepted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user