]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphindetailsview.cpp
Make sure that an item's visualRect in the Details View is not wider
[dolphin.git] / src / views / dolphindetailsview.cpp
index 2d0d522acd3cdd38eb070b9a813c2a634cc0883b..83460163caa37fb4a0f3f47b76fb0beb9bf82ed6 100644 (file)
@@ -299,7 +299,10 @@ QRect DolphinDetailsView::visualRect(const QModelIndex& index) const
     const KFileItem item = m_dolphinViewController->itemForIndex(index);
     if (!item.isNull()) {
         const int width = DolphinFileItemDelegate::nameColumnWidth(item.text(), viewOptions());
-        rect.setWidth(width);
+
+        if (width < rect.width()) {
+            rect.setWidth(width);
+        }
     }
 
     return rect;