mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
avoid cells for being moved on drag (this is going to be a problem for grid view sorting)
This commit is contained in:
parent
36c9ac804f
commit
6ea4fe155d
@ -38,11 +38,13 @@ Rectangle {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: realCell
|
id: realCell
|
||||||
|
|
||||||
|
property int position : 0
|
||||||
|
|
||||||
Drag.active: mouseArea.drag.active
|
Drag.active: mouseArea.drag.active
|
||||||
Drag.hotSpot.x: 32
|
Drag.hotSpot.x: 32
|
||||||
Drag.hotSpot.y: 32
|
Drag.hotSpot.y: 32
|
||||||
Drag.dragType: Drag.Automatic
|
Drag.dragType: Drag.Automatic
|
||||||
Drag.mimeData: { "text/plain": "comic" }
|
Drag.mimeData: { "text/plain": titleText.text }
|
||||||
Drag.proposedAction: Qt.CopyAction
|
Drag.proposedAction: Qt.CopyAction
|
||||||
|
|
||||||
width: 156; height: 287
|
width: 156; height: 287
|
||||||
@ -53,6 +55,12 @@ Rectangle {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
drag.target: realCell
|
drag.target: realCell
|
||||||
|
|
||||||
|
drag.minimumX: 0
|
||||||
|
drag.maximumX: 0
|
||||||
|
drag.minimumY: 0
|
||||||
|
drag.maximumY: 0
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
@ -87,6 +95,7 @@ Rectangle {
|
|||||||
comicsSelectionHelper.selectIndex(index)
|
comicsSelectionHelper.selectIndex(index)
|
||||||
grid.currentIndex = index;
|
grid.currentIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Menu emits the 'main' signals
|
//Menu emits the 'main' signals
|
||||||
@ -159,6 +168,7 @@ Rectangle {
|
|||||||
|
|
||||||
//title
|
//title
|
||||||
Text {
|
Text {
|
||||||
|
id : titleText
|
||||||
anchors { top: realCell.top; left: realCell.left; leftMargin: 4; rightMargin: 4; topMargin: 234; }
|
anchors { top: realCell.top; left: realCell.left; leftMargin: 4; rightMargin: 4; topMargin: 234; }
|
||||||
width: 148
|
width: 148
|
||||||
maximumLineCount: 2
|
maximumLineCount: 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user