mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Update listeners definitions
This commit is contained in:
parent
f3e08a04d7
commit
1a25fd0740
@ -54,7 +54,7 @@ Rectangle {
|
|||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill : list
|
anchors.fill : list
|
||||||
onWheel: {
|
onWheel: wheel => {
|
||||||
|
|
||||||
if(list.moving)
|
if(list.moving)
|
||||||
return;
|
return;
|
||||||
@ -96,10 +96,11 @@ Rectangle {
|
|||||||
|
|
||||||
highlightMoveDuration: 250
|
highlightMoveDuration: 250
|
||||||
|
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: currentIndex => {
|
||||||
if (currentIndex !== -1)
|
if (list.currentIndex !== -1) {
|
||||||
currentCoverChanged(currentIndex);
|
mainFlowContainer.currentCoverChanged(list.currentIndex);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delegate: Component {
|
delegate: Component {
|
||||||
|
|
||||||
@ -173,7 +174,7 @@ Rectangle {
|
|||||||
currentIndexHelper.selectedItem(index);
|
currentIndexHelper.selectedItem(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
onReleased: {
|
onReleased: mouse => {
|
||||||
list.currentIndex = index;
|
list.currentIndex = index;
|
||||||
|
|
||||||
if(mouse.button === Qt.RightButton) // context menu is requested
|
if(mouse.button === Qt.RightButton) // context menu is requested
|
||||||
@ -189,7 +190,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
focus: true
|
focus: true
|
||||||
Keys.onPressed: {
|
Keys.onPressed: event => {
|
||||||
|
|
||||||
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier)
|
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user