]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/private/kitemlistheaderwidget.cpp
[Places Panel] Make use of KFilePlacesView::dragAutoActivationDelay
[dolphin.git] / src / kitemviews / private / kitemlistheaderwidget.cpp
index 8b39c25fe208289a7bd3e083c07d535fb024d463..5fb929e5209b50bf48b696e68df93b08dd46978a 100644 (file)
@@ -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()) {