@@ -3,7 +3,7 @@ import { ScanState, SimilarGroupCard } from "common.slint";
33import { AppState , SimilarImagesSettings } from "app_state.slint" ;
44import { StatusChip , TouchButton } from "components.slint" ;
55import { Translations } from "translations.slint" ;
6- import { MomentumScrollView } from "momentum_scroll .slint" ;
6+ import { ListView } from "std-widgets .slint" ;
77
88component GalleryImageCell {
99 in property <image > thumbnail ;
@@ -271,11 +271,9 @@ export component SimilarImagesGallery {
271271 property <string > ctx_open_folder : "" ;
272272 property <string > ctx_item_name : "" ;
273273
274- // Set to true while any per-row horizontal SGR is active so the vertical
275- // MomentumScrollView does not steal the gesture during reversals.
276- // Cleared only in the horizontal sgr.swiped handler (on finger-up).
277274 property <bool > _h_locked : false ;
278275
276+
279277 VerticalLayout {
280278 spacing : 0px ;
281279
@@ -303,15 +301,8 @@ export component SimilarImagesGallery {
303301 // Inline the scroller directly (like ResultsList does) so that
304302 // vertical-stretch: 1.0 is applied to a real element in the layout,
305303 // not wrapped inside an intermediate component.
306- if groups.length > 0 : gallery_scroll := MomentumScrollView {
304+ if groups.length > 0 : gallery_scroll := ListView {
307305 vertical-stretch : 1.0 ;
308- scroll_y <=> AppState.gallery_scroll_y;
309- lock_vertical : root ._h_locked;
310- swiped (d, v, m) => {
311- AppState.gallery_max_scroll_f = m;
312- AppState.gallery_swiped (d, v);
313- }
314- stop_momentum => { AppState.gallery_stop_momentum (); }
315306
316307 for group in root .groups : VerticalLayout {
317308 padding-left : 8px ;
@@ -345,7 +336,7 @@ export component SimilarImagesGallery {
345336 height : 244px ;
346337 swiped => {
347338 // Horizontal gesture finished — release the lock so the
348- // outer MomentumScrollView can handle verticals again.
339+ // outer ListView can handle verticals again.
349340 root ._h_locked = false ;
350341 self .committed_x = self .committed_x + self .current-position.x - self .pressed-position.x;
351342 if self .committed_x > 0px { self .committed_x = 0px ; }
@@ -377,8 +368,7 @@ export component SimilarImagesGallery {
377368 checked : img.checked;
378369 is_reference : img.is_reference;
379370 // Cancel long-press when either the horizontal or the
380- // vertical (MomentumScrollView) SGR claims the gesture.
381- any_sgr_swiping : sgr.swiping || gallery_scroll.is_swiping;
371+ any_sgr_swiping : sgr.swiping;
382372 cell_long_pressed (f, d, n) => {
383373 root .ctx_open_file = f;
384374 root .ctx_open_folder = d;
@@ -390,7 +380,7 @@ export component SimilarImagesGallery {
390380 }
391381 }
392382
393- // When the horizontal swipe is confirmed, lock the vertical SGR .
383+ // Track horizontal swipe state .
394384 // Safe: depends only on sgr.swiping — no layout properties.
395385 property <bool > _row_swiping : sgr.swiping;
396386 changed _row_swiping => {
0 commit comments