┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kstandarditemlistwidget.cpp
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2013-06-26 22:07:57 +0200
committerEmmanuel Pescosta <[email protected]>2013-06-26 22:07:57 +0200
commit5ca5a8f3b61f74c7857fbfb4522ef27ad89e9a0e (patch)
tree13a25c15edf047399401a9bcefa79c159f4aa95c /src/kitemviews/kstandarditemlistwidget.cpp
parent391d36edf78d07caa4116b6af0687d1f192bc82d (diff)
Remove the space (1 pixel) between the file name and the file
icon in Compact View and Details View mode. BUG: 320899 FIXED-IN: 4.11.0 REVIEW: 111244
Diffstat (limited to 'src/kitemviews/kstandarditemlistwidget.cpp')
-rw-r--r--src/kitemviews/kstandarditemlistwidget.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp
index 9a3f8f7bd..b429211b8 100644
--- a/src/kitemviews/kstandarditemlistwidget.cpp
+++ b/src/kitemviews/kstandarditemlistwidget.cpp
@@ -348,6 +348,9 @@ void KStandardItemListWidget::paint(QPainter* painter, const QStyleOptionGraphic
painter->setPen(Qt::green);
painter->drawRect(m_iconRect);
+ painter->setPen(Qt::blue);
+ painter->drawRect(m_textRect);
+
painter->setPen(Qt::red);
painter->drawText(QPointF(0, m_customizedFontMetrics.height()), QString::number(index()));
painter->drawRect(rect());
@@ -1147,7 +1150,7 @@ void KStandardItemListWidget::updateCompactLayoutTextCache()
y += lineSpacing;
}
- m_textRect = QRectF(x - option.padding, 0, maximumRequiredTextWidth + 2 * option.padding, widgetHeight);
+ m_textRect = QRectF(x - 2 * option.padding, 0, maximumRequiredTextWidth + 3 * option.padding, widgetHeight);
}
void KStandardItemListWidget::updateDetailsLayoutTextCache()
@@ -1205,8 +1208,8 @@ void KStandardItemListWidget::updateDetailsLayoutTextCache()
const qreal textWidth = option.extendedSelectionRegion
? size().width() - textInfo->pos.x()
: requiredWidth + 2 * option.padding;
- m_textRect = QRectF(textInfo->pos.x() - option.padding, 0,
- textWidth, size().height());
+ m_textRect = QRectF(textInfo->pos.x() - 2 * option.padding, 0,
+ textWidth + option.padding, size().height());
// The column after the name should always be aligned on the same x-position independent
// from the expansion-level shown in the name column