]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kstandarditemlistwidget.cpp
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / kitemviews / kstandarditemlistwidget.cpp
index 0d3cfed1a596eacf888e3a230a8a58a2f890ed9f..d2806082afc7f56ceb4d24d21f6981011a4247ff 100644 (file)
@@ -536,6 +536,7 @@ QRectF KStandardItemListWidget::selectionToggleRect() const
 {
     const_cast<KStandardItemListWidget *>(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 {