diff options
| author | Amol Godbole <[email protected]> | 2023-10-13 21:08:35 -0500 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-10-17 15:47:34 +0000 |
| commit | a59d9f85fa770a00d10e66025e102c736e18fa70 (patch) | |
| tree | 9f19443512de2c0adc1fa75082ba27495188ca3f /src/views/dolphinview.cpp | |
| parent | d1035e7f090a5c810e72e37a03df81b2a4389747 (diff) | |
KItemListView: add view position in scrollToItem()
An item, on being scrolled to, is always located at the nearest edge of
the view. This is not always convenient. Allow specifying where the item
should be positioned with respect to the view in scrollToItem().
BUG: 423884
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index ace763b15..0a1d70bf1 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1761,7 +1761,7 @@ void DolphinView::updateViewState() // scroll to current item and reset the state if (m_scrollToCurrentItem) { - m_view->scrollToItem(currentIndex); + m_view->scrollToItem(currentIndex, KItemListView::ViewItemPosition::Middle); m_scrollToCurrentItem = false; } m_currentItemUrl = QUrl(); |
