diff options
| author | Eugene Popov <[email protected]> | 2024-03-27 10:28:15 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2024-03-27 10:28:15 +0000 |
| commit | 240d33ce17fc531e8bc6638af8f71454fe7c05e6 (patch) | |
| tree | 11eea661f23034830e9358df1ced907b95b9f0a7 /src/kitemviews/kitemlistview.cpp | |
| parent | 7a7cab61b6fd8d058ca47887f90fa5cd12a3ccca (diff) | |
Better support for RTL
This MR fixes some issues related to RTL scripts:
- wrong layout in Compact View mode
- broken horizontal scrolling in Icon View and Details View modes
- broken navigation with left and right arrow keys in Details View mode
BUG: 484012
BUG: 449493
Diffstat (limited to 'src/kitemviews/kitemlistview.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index f906b7a13..e291ee5ec 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -550,6 +550,10 @@ void KItemListView::scrollToItem(int index, ViewItemPosition viewItemPosition) } QRectF currentRect = itemRect(index); + if (layoutDirection() == Qt::RightToLeft && scrollOrientation() == Qt::Horizontal) { + currentRect.moveTo(m_layouter->size().width() - currentRect.right(), 0); + } + // Fix for Bug 311099 - View the underscore when using Ctrl + PageDown currentRect.adjust(-m_styleOption.horizontalMargin, -m_styleOption.verticalMargin, m_styleOption.horizontalMargin, m_styleOption.verticalMargin); |
