From a59d9f85fa770a00d10e66025e102c736e18fa70 Mon Sep 17 00:00:00 2001 From: Amol Godbole Date: Fri, 13 Oct 2023 21:08:35 -0500 Subject: 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 --- src/views/dolphinview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/views/dolphinview.cpp') 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(); -- cgit v1.3