diff options
| author | Peter Penz <[email protected]> | 2012-02-15 16:10:01 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-02-15 16:20:47 +0100 |
| commit | 749362987b9617ddfc461b647ac436be5a6eaca4 (patch) | |
| tree | fa4f943872d44450d946e2ad4ea05ffd264e9b6b /src/kitemviews | |
| parent | cf72e481110d76081d1757dc89da5d8f68627b19 (diff) | |
Folders Panel: Use the whole width as selection region
As no rubberband-selection is enabled for the Folders Panel it does
not make sense to keep the selection region as small as possible.
BUG: 294111
FIXED-IN: 4.8.1
Diffstat (limited to 'src/kitemviews')
| -rw-r--r-- | src/kitemviews/kfileitemlistwidget.cpp | 5 | ||||
| -rw-r--r-- | src/kitemviews/kitemliststyleoption.cpp | 6 | ||||
| -rw-r--r-- | src/kitemviews/kitemliststyleoption.h | 1 |
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 |
