[app] Tweaking BooksShelfView
It doesn't need to be flickable. Also, re-parented BooksDragArea
This commit is contained in:
parent
2f435649b7
commit
26e651a932
1 changed files with 18 additions and 12 deletions
|
@ -33,7 +33,7 @@ import QtQuick 2.0
|
||||||
import Sailfish.Silica 1.0
|
import Sailfish.Silica 1.0
|
||||||
import harbour.books 1.0
|
import harbour.books 1.0
|
||||||
|
|
||||||
SilicaFlickable {
|
Item {
|
||||||
id: shelfView
|
id: shelfView
|
||||||
|
|
||||||
property int shelfIndex
|
property int shelfIndex
|
||||||
|
@ -254,22 +254,28 @@ SilicaFlickable {
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
|
|
||||||
BooksDragArea {
|
onActiveFocusChanged: console.log("BooksShelfView.grid", activeFocus)
|
||||||
id: dragArea
|
|
||||||
dragParent: storageView
|
|
||||||
gridView: grid
|
|
||||||
onDeleteItemAt: {
|
|
||||||
if (!shelfView.deleteAllRequest) {
|
|
||||||
shelfView.shelf.setDeleteRequested(index, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onDropItem: shelfView.dropItem(mouseX, mouseY)
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on y { SpringAnimation {} }
|
Behavior on y { SpringAnimation {} }
|
||||||
VerticalScrollDecorator {}
|
VerticalScrollDecorator {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BooksDragArea {
|
||||||
|
id: dragArea
|
||||||
|
dragParent: storageView
|
||||||
|
gridView: grid
|
||||||
|
onDeleteItemAt: {
|
||||||
|
if (!shelfView.deleteAllRequest) {
|
||||||
|
shelfView.shelf.setDeleteRequested(index, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onDropItem: shelfView.dropItem(mouseX, mouseY)
|
||||||
|
onActiveFocusChanged: console.log("BooksShelfView.grid.dragArea", activeFocus)
|
||||||
|
Component.onCompleted: {
|
||||||
|
console.log("BooksDragArea created")
|
||||||
|
grid.focus = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: longStartTimer
|
id: longStartTimer
|
||||||
|
|
Loading…
Reference in a new issue