]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistview.cpp
Add symmetric padding on right side of details view
[dolphin.git] / src / kitemviews / kitemlistview.cpp
index 239e399a45b9060701bb4adb5a65177701d12f33..77114735bada9a536beb366f736d41b2798d33fe 100644 (file)
@@ -2405,7 +2405,9 @@ void KItemListView::applyAutomaticColumnWidths()
     qreal firstColumnWidth = m_headerWidget->columnWidth(firstRole);
     QSizeF dynamicItemSize = m_itemSize;
 
-    qreal requiredWidth = columnWidthsSum() + m_headerWidget->leadingPadding();
+    qreal requiredWidth = columnWidthsSum() + m_headerWidget->leadingPadding()
+        + m_headerWidget->leadingPadding(); // Adding the padding a second time so we have the same padding symmetrically on both sides of the view.
+        // This improves UX, looks better and increases the chances of users figuring out that the padding area can be used for deselecting and dropping files.
     const qreal availableWidth = size().width();
     if (requiredWidth < availableWidth) {
         // Stretch the first column to use the whole remaining width