https://bugs.kde.org/show_bug.cgi?id=396008

--- Comment #15 from Méven <[email protected]> ---
Git commit 1000eeed2ce4914ca1d77d178e41e0d065928aab by Méven Car, on behalf of
Sascha Masanneck.
Committed on 27/09/2026 at 08:43.
Pushed by meven into branch 'master'.

kitemlistview: handle scrolloffset at resize when scrolled to
top/bottom/between

A resize only held on to the topmost visible item. A view at the end
lost the end when the list grew or the view got shorter, and reflow
could push a visible selected item off screen.

- A view at the start or end of the list stays there.
- A visible selected item, the current one first, stays fully visible;
  edge and position give way to it. An off-screen selection or an
  unselected current item is ignored.
- The anchor is reused across a series of resizes only while offset,
  list length and visible selection are unchanged, so zooming or
  selecting in between no longer restores a stale one.
- The end clamp includes the small statusbar offset, which left the
  last row hidden under the statusbar.

The scrolling math of scrollToItem() moves to scrollDeltaToShowItem(),
which also works for an offset not applied yet. Tests cover icons,
compact (also RTL) and details at start, middle and end for four
resize directions.

M  +134  -23   src/kitemviews/kitemlistview.cpp
M  +32   -9    src/kitemviews/kitemlistview.h
M  +386  -48   src/tests/dolphinitemlistviewtest.cpp

https://invent.kde.org/system/dolphin/-/commit/1000eeed2ce4914ca1d77d178e41e0d065928aab

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to