diff --git a/src/qml/presenter/Presentation.qml b/src/qml/presenter/Presentation.qml index 5b429de..b5c57d6 100644 --- a/src/qml/presenter/Presentation.qml +++ b/src/qml/presenter/Presentation.qml @@ -198,6 +198,8 @@ FocusScope { reuseItems: true model: SlideModel delegate: Presenter.PreviewSlideListDelegate {} + highlight: highlightBar + highlightFollowsCurrentItem: false Kirigami.WheelHandler { id: wheelHandler @@ -225,21 +227,24 @@ FocusScope { } - Rectangle { - id: activeHighlightBar - width: Kirigami.Units.gridUnit * 10 - height: Kirigami.Units.gridUnit / 4 - y: previewSlidesList.y + Kirigami.Units.gridUnit * 6.15 - x: previewSlidesList.currentItem.x + Kirigami.Units.smallSpacing - radius: 5 - color: Kirigami.Theme.negativeTextColor + Component { + id: highlightBar + Rectangle { + id: activeHighlightBar + width: Kirigami.Units.gridUnit * 10 + height: Kirigami.Units.gridUnit / 4 + y: Kirigami.Units.gridUnit * 7.35 + x: previewSlidesList.currentItem.x + radius: 5 + color: Kirigami.Theme.negativeTextColor - Behavior on x { PropertyAnimation { - properties: "x" - easing.type: Easing.InOutElastic; - easing.period: 1.5 - duration: 150 - }} + Behavior on x { PropertyAnimation { + properties: "x" + easing.type: Easing.InOutElastic; + easing.period: 1.5 + duration: 150 + }} + } } } diff --git a/src/qml/presenter/PreviewSlideListDelegate.qml b/src/qml/presenter/PreviewSlideListDelegate.qml index 53acf59..6940ea7 100644 --- a/src/qml/presenter/PreviewSlideListDelegate.qml +++ b/src/qml/presenter/PreviewSlideListDelegate.qml @@ -48,8 +48,9 @@ Item { id: slidesTitle width: previewHighlight.width anchors.top: previewHighlight.bottom - /* anchors.leftMargin: Kirigami.Units.smallSpacing * 8 */ - anchors.topMargin: Kirigami.Units.smallSpacing * 3 + anchors.left: previewHighlight.left + anchors.topMargin: Kirigami.Units.smallSpacing + anchors.leftMargin: Kirigami.Units.smallSpacing elide: Text.ElideRight text: ServiceItemModel.getItem(serviceItemId).name font.bold: true @@ -74,7 +75,7 @@ Item { function onDataChanged() { if (active) { previewSlidesList.currentIndex = index; - previewSlidesList.positionViewAtIndex(index, ListView.Contain); + previewSlidesList.positionViewAtIndex(index, ListView.Center); } } }