adding a scrollbar and trying to make listview scroll again
This commit is contained in:
parent
f535bc1500
commit
cd825c6ed4
1 changed files with 16 additions and 8 deletions
|
@ -11,7 +11,7 @@ import org.presenter 1.0
|
||||||
FocusScope {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
height: parent.height
|
/* height: parent.height */
|
||||||
|
|
||||||
property var text
|
property var text
|
||||||
property int textIndex: 0
|
property int textIndex: 0
|
||||||
|
@ -28,7 +28,7 @@ FocusScope {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainGrid
|
id: mainGrid
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.bottomMargin: 160
|
anchors.bottomMargin: Kirigami.Units.largeSpacing * 20
|
||||||
/* columns: 3 */
|
/* columns: 3 */
|
||||||
/* rowSpacing: 5 */
|
/* rowSpacing: 5 */
|
||||||
/* columnSpacing: 0 */
|
/* columnSpacing: 0 */
|
||||||
|
@ -183,7 +183,7 @@ FocusScope {
|
||||||
anchors.top: mainGrid.bottom
|
anchors.top: mainGrid.bottom
|
||||||
anchors.bottom: root.bottom - Kirigami.Units.gridUnit
|
anchors.bottom: root.bottom - Kirigami.Units.gridUnit
|
||||||
width: parent.width
|
width: parent.width
|
||||||
orientation: Qt.Horizontal
|
orientation: ListView.Horizontal
|
||||||
spacing: Kirigami.Units.smallSpacing * 2
|
spacing: Kirigami.Units.smallSpacing * 2
|
||||||
cacheBuffer: 900
|
cacheBuffer: 900
|
||||||
reuseItems: true
|
reuseItems: true
|
||||||
|
@ -195,17 +195,25 @@ FocusScope {
|
||||||
target: previewSlidesList
|
target: previewSlidesList
|
||||||
filterMouseEvents: true
|
filterMouseEvents: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Controls.ScrollBar.horizontal: Controls.ScrollBar {
|
||||||
|
/* parent: songLibraryList.parent */
|
||||||
|
/* anchors.right: previewSlidesList.right */
|
||||||
|
/* anchors.top: previewSlidesList.bottom */
|
||||||
|
/* anchors.topMargin: Kirigami.Units.smallSpacing */
|
||||||
|
/* anchors.left: previewSlidesList.right */
|
||||||
|
/* anchors.top: activeHighlightBar.bottom */
|
||||||
|
active: hovered || pressed
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: activeHighlightBar
|
id: activeHighlightBar
|
||||||
width: Kirigami.Units.gridUnit * 10
|
width: Kirigami.Units.gridUnit * 10
|
||||||
height: Kirigami.Units.gridUnit / 4
|
height: Kirigami.Units.gridUnit / 4
|
||||||
y: previewSlidesList.y + Kirigami.Units.gridUnit * 6
|
y: previewSlidesList.y + Kirigami.Units.gridUnit * 6.15
|
||||||
x: {
|
x: previewSlidesList.currentItem.x + Kirigami.Units.smallSpacing
|
||||||
let slideX = SlideObject.slideIndex === 0 ? previewSlidesList.currentItem.width : (SlideObject.slideIndex - 1) * previewSlidesList.currentItem.width
|
|
||||||
previewSlidesList.currentItem.x + Kirigami.Units.smallSpacing
|
|
||||||
}
|
|
||||||
radius: 5
|
radius: 5
|
||||||
color: Kirigami.Theme.negativeTextColor
|
color: Kirigami.Theme.negativeTextColor
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue