X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/240d33ce17fc531e8bc6638af8f71454fe7c05e6..ffce84e759714e94de01a546009b4b41c64cdf28:/src/kitemviews/kstandarditemlistwidget.cpp diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index 0d3cfed1a..d2806082a 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -536,6 +536,7 @@ QRectF KStandardItemListWidget::selectionToggleRect() const { const_cast(this)->triggerCacheRefreshing(); + const QRectF widgetIconRect = iconRect(); const int widgetIconSize = iconSize(); int toggleSize = KIconLoader::SizeSmall; if (widgetIconSize >= KIconLoader::SizeEnormous) { @@ -544,7 +545,7 @@ QRectF KStandardItemListWidget::selectionToggleRect() const toggleSize = KIconLoader::SizeSmallMedium; } - QPointF pos = iconRect().topLeft(); + QPointF pos = widgetIconRect.topLeft(); // If the selection toggle has a very small distance to the // widget borders, the size of the selection toggle will get @@ -565,6 +566,10 @@ QRectF KStandardItemListWidget::selectionToggleRect() const pos.setX(0); } + if (QApplication::isRightToLeft()) { + pos.setX(widgetIconRect.right() - (pos.x() + toggleSize - widgetIconRect.left())); + } + return QRectF(pos, QSizeF(toggleSize, toggleSize)); } @@ -1508,8 +1513,8 @@ void KStandardItemListWidget::updateAdditionalInfoTextColor() if (m_customTextColor.isValid()) { c1 = m_customTextColor; } else if (isSelected() && hasFocus && (m_layout != DetailsLayout || m_highlightEntireRow)) { - // The detail text colour needs to match the main text (HighlightedText) for the same level - // of readability. We short circuit early here to avoid interpolating with another colour. + // The detail text color needs to match the main text (HighlightedText) for the same level + // of readability. We short circuit early here to avoid interpolating with another color. m_additionalInfoTextColor = styleOption().palette.color(QPalette::HighlightedText); return; } else {