diff options
| author | Jan Blackquill <[email protected]> | 2022-01-21 18:42:20 -0500 |
|---|---|---|
| committer | Janet Blackquill <[email protected]> | 2022-01-25 23:49:03 +0000 |
| commit | 65846125d7f4dd90acd69abf73161607ba76cc8b (patch) | |
| tree | 4cdcbc8fbcade5f97139d7c540d34e47fad0eaba /src/kitemviews/private/kitemlistheaderwidget.cpp | |
| parent | d71b617205ce152dedc5d3a5b5b801697741f8eb (diff) | |
Make group headers mirror rtl
Diffstat (limited to 'src/kitemviews/private/kitemlistheaderwidget.cpp')
| -rw-r--r-- | src/kitemviews/private/kitemlistheaderwidget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kitemviews/private/kitemlistheaderwidget.cpp b/src/kitemviews/private/kitemlistheaderwidget.cpp index 8b39c25fe..5fb929e52 100644 --- a/src/kitemviews/private/kitemlistheaderwidget.cpp +++ b/src/kitemviews/private/kitemlistheaderwidget.cpp @@ -420,6 +420,12 @@ void KItemListHeaderWidget::paintRole(QPainter* painter, // The following code is based on the code from QHeaderView::paintSection(). // SPDX-FileCopyrightText: 2011 Nokia Corporation and/or its subsidiary(-ies). QStyleOptionHeader option; + option.direction = widget->layoutDirection(); + option.textAlignment = + widget->layoutDirection() == Qt::LeftToRight + ? Qt::AlignLeft + : Qt::AlignRight; + option.section = orderIndex; option.state = QStyle::State_None | QStyle::State_Raised | QStyle::State_Horizontal; if (isEnabled()) { |
