[app] Tweaking BooksShelfView

It doesn't need to be flickable. Also, re-parented BooksDragArea
This commit is contained in:
Slava Monich 2015-12-01 19:00:55 +02:00
parent 2f435649b7
commit 26e651a932

View file

@ -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