From 09a86af05689d8f56d3907d14e89ec179a58018a Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 17 Jan 2023 14:50:26 -0600 Subject: [PATCH] making the activeHighlightBar follow the item in slideList --- src/qml/presenter/Presentation.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qml/presenter/Presentation.qml b/src/qml/presenter/Presentation.qml index fcaf78e..93cc225 100644 --- a/src/qml/presenter/Presentation.qml +++ b/src/qml/presenter/Presentation.qml @@ -203,16 +203,20 @@ FocusScope { Rectangle { id: activeHighlightBar - width: previewSlidesList.currentItem.width - Kirigami.Units.smallSpacing * 2 + width: Kirigami.Units.gridUnit * 10 height: Kirigami.Units.gridUnit / 4 y: previewSlidesList.y + Kirigami.Units.gridUnit * 6 - x: previewSlidesList.currentItem.x + Kirigami.Units.smallSpacing + x: { + let slideX = SlideObject.slideIndex === 0 ? previewSlidesList.currentItem.width : (SlideObject.slideIndex - 1) * previewSlidesList.currentItem.width + previewSlidesList.currentItem.x + Kirigami.Units.smallSpacing + } radius: 5 color: Kirigami.Theme.negativeTextColor Behavior on x { PropertyAnimation { properties: "x" - easing.type: Easing.InOutQuad; + easing.type: Easing.InOutElastic; + easing.period: 1.5 duration: 150 }} }