┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistheaderwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews/private/kitemlistheaderwidget.cpp')
-rw-r--r--src/kitemviews/private/kitemlistheaderwidget.cpp6
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()) {