From 8b23c9809cbf1488c65dba5377a945449feb6754 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 18 Jan 2024 04:20:39 -0600 Subject: [PATCH] fixing the transition of the previewSlideList following active item --- src/qml/presenter/Presentation.qml | 4 ++-- src/rust/slide_model.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qml/presenter/Presentation.qml b/src/qml/presenter/Presentation.qml index 0d3e420..d08f8c9 100644 --- a/src/qml/presenter/Presentation.qml +++ b/src/qml/presenter/Presentation.qml @@ -199,10 +199,10 @@ FocusScope { id: highlightBar Rectangle { id: activeHighlightBar - width: Kirigami.Units.gridUnit * 10 + width: previewSlideList.currentItem.width height: Kirigami.Units.gridUnit / 4 y: Kirigami.Units.gridUnit * 7.35 - x: 0 + x: previewSlideList.currentItem.x radius: 5 color: Kirigami.Theme.negativeTextColor diff --git a/src/rust/slide_model.rs b/src/rust/slide_model.rs index ce7c7d5..fa2f03d 100644 --- a/src/rust/slide_model.rs +++ b/src/rust/slide_model.rs @@ -66,7 +66,7 @@ mod slide_model { ); #[qsignal] - fn active_change(self: Pin<&mut SlideModel>, index: &i32); + fn active_changed(self: Pin<&mut SlideModel>, index: &i32); #[qinvokable] fn add_video_thumbnail( @@ -1088,7 +1088,7 @@ impl slide_model::SlideModel { // We use this signal generated by our signals enum to tell QML that // the active slide has changed which is used to reposition views. - self.as_mut().active_change(&index); + self.as_mut().active_changed(&index); true } else { false