Add grid scrolling to ProviderBrowse view
This commit is contained in:
@@ -27,9 +27,9 @@ Rectangle {
|
||||
width: parent.width
|
||||
}
|
||||
CoverGrid {
|
||||
id: coverGrid
|
||||
height: parent.height - 80
|
||||
width: parent.width
|
||||
id: coverGrid
|
||||
provider: root.provider
|
||||
shows: root.provider.showsAlphabetic
|
||||
selected: currentView == 0
|
||||
@@ -62,9 +62,20 @@ Rectangle {
|
||||
coverGrid.xIndex++;
|
||||
}
|
||||
} else if (event.key == Qt.Key_Down) {
|
||||
coverGrid.yIndex++;
|
||||
var max = Math.floor(coverGrid.shows.length / coverGrid.numColumns);
|
||||
if (coverGrid.yIndex < max) {
|
||||
coverGrid.yIndex++;
|
||||
if (coverGrid.scrollIndex < coverGrid.yIndex - 1.5) {
|
||||
coverGrid.scrollIndex++;
|
||||
}
|
||||
}
|
||||
} else if (event.key == Qt.Key_Up) {
|
||||
coverGrid.yIndex--;
|
||||
if (coverGrid.yIndex > 0) {
|
||||
coverGrid.yIndex--;
|
||||
if (coverGrid.scrollIndex > coverGrid.yIndex + 0.5) {
|
||||
coverGrid.scrollIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (currentView == 1) { // alphabet
|
||||
if (event.key == Qt.Key_Left) {
|
||||
|
||||
Reference in New Issue
Block a user