fixing the transition of the previewSlideList following active item

This commit is contained in:
Chris Cochrun 2024-01-18 04:20:39 -06:00
parent 4910eabc75
commit 8b23c9809c
2 changed files with 4 additions and 4 deletions

View file

@ -199,10 +199,10 @@ FocusScope {
id: highlightBar id: highlightBar
Rectangle { Rectangle {
id: activeHighlightBar id: activeHighlightBar
width: Kirigami.Units.gridUnit * 10 width: previewSlideList.currentItem.width
height: Kirigami.Units.gridUnit / 4 height: Kirigami.Units.gridUnit / 4
y: Kirigami.Units.gridUnit * 7.35 y: Kirigami.Units.gridUnit * 7.35
x: 0 x: previewSlideList.currentItem.x
radius: 5 radius: 5
color: Kirigami.Theme.negativeTextColor color: Kirigami.Theme.negativeTextColor

View file

@ -66,7 +66,7 @@ mod slide_model {
); );
#[qsignal] #[qsignal]
fn active_change(self: Pin<&mut SlideModel>, index: &i32); fn active_changed(self: Pin<&mut SlideModel>, index: &i32);
#[qinvokable] #[qinvokable]
fn add_video_thumbnail( 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 // We use this signal generated by our signals enum to tell QML that
// the active slide has changed which is used to reposition views. // the active slide has changed which is used to reposition views.
self.as_mut().active_change(&index); self.as_mut().active_changed(&index);
true true
} else { } else {
false false