┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kfileitemlistwidget.cpp5
-rw-r--r--src/kitemviews/kitemliststyleoption.cpp6
-rw-r--r--src/kitemviews/kitemliststyleoption.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/src/kitemviews/kfileitemlistwidget.cpp b/src/kitemviews/kfileitemlistwidget.cpp
index dc1554dab..83fb914a1 100644
--- a/src/kitemviews/kfileitemlistwidget.cpp
+++ b/src/kitemviews/kfileitemlistwidget.cpp
@@ -780,8 +780,11 @@ void KFileItemListWidget::updateDetailsLayoutTextCache()
switch (textId) {
case Name: {
+ const qreal textWidth = option.extendedSelectionRegion
+ ? size().width() - m_textPos[textId].x()
+ : requiredWidth + 2 * option.padding;
m_textRect = QRectF(m_textPos[textId].x() - option.padding, 0,
- requiredWidth + 2 * option.padding, size().height());
+ textWidth, 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
diff --git a/src/kitemviews/kitemliststyleoption.cpp b/src/kitemviews/kitemliststyleoption.cpp
index 5266ef6bd..c512fa43e 100644
--- a/src/kitemviews/kitemliststyleoption.cpp
+++ b/src/kitemviews/kitemliststyleoption.cpp
@@ -29,7 +29,8 @@ KItemListStyleOption::KItemListStyleOption() :
padding(0),
horizontalMargin(0),
verticalMargin(0),
- iconSize(KIconLoader::SizeMedium)
+ iconSize(KIconLoader::SizeMedium),
+ extendedSelectionRegion(false)
{
}
@@ -41,7 +42,8 @@ KItemListStyleOption::KItemListStyleOption(const KItemListStyleOption& other) :
padding(other.padding),
horizontalMargin(other.horizontalMargin),
verticalMargin(other.verticalMargin),
- iconSize(other.iconSize)
+ iconSize(other.iconSize),
+ extendedSelectionRegion(other.extendedSelectionRegion)
{
}
diff --git a/src/kitemviews/kitemliststyleoption.h b/src/kitemviews/kitemliststyleoption.h
index 9284dc61b..62441ef4b 100644
--- a/src/kitemviews/kitemliststyleoption.h
+++ b/src/kitemviews/kitemliststyleoption.h
@@ -42,6 +42,7 @@ public:
int horizontalMargin;
int verticalMargin;
int iconSize;
+ bool extendedSelectionRegion;
};
#endif