diff options
| author | Peter Penz <[email protected]> | 2010-11-08 16:26:01 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-11-08 16:26:01 +0000 |
| commit | 0ee402486b4fe7078b16da49e3859983e1c0e0f1 (patch) | |
| tree | a63af977202ae0b22894827609a4a60710172ee5 /src/views/dolphincolumnviewcontainer.cpp | |
| parent | f141cf61ab1515b8573f879287dd9b758059cf30 (diff) | |
Also assure that when scrolling right that the currently completely invisible column gets partly visible.
svn path=/trunk/KDE/kdebase/apps/; revision=1194305
Diffstat (limited to 'src/views/dolphincolumnviewcontainer.cpp')
| -rw-r--r-- | src/views/dolphincolumnviewcontainer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/views/dolphincolumnviewcontainer.cpp b/src/views/dolphincolumnviewcontainer.cpp index 31ec21083..cad4941cc 100644 --- a/src/views/dolphincolumnviewcontainer.cpp +++ b/src/views/dolphincolumnviewcontainer.cpp @@ -259,19 +259,19 @@ void DolphinColumnViewContainer::slotAssureVisibleActiveColumn() const int viewportWidth = viewport()->width(); const int x = activeColumn()->x(); - // When a column that is partly visible on the left side gets activated, - // it is useful to also assure that the previous column is partly visible. - // This allows the user to scroll to the first column without using the + // When a column that is partly visible gets activated, + // it is useful to also assure that the neighbor column is partly visible. + // This allows the user to scroll to the first/last column without using the // scrollbar and drag & drop operations to invisible columns. - const int previousColumnGap = 3 * style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, verticalScrollBar()); + const int neighborColumnGap = 3 * style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, verticalScrollBar()); const int width = activeColumn()->maximumWidth(); if (x + width > viewportWidth) { const int newContentX = m_contentX - x - width + viewportWidth; if (isRightToLeft()) { - m_animation->setFrameRange(m_contentX, newContentX + previousColumnGap); + m_animation->setFrameRange(m_contentX, newContentX + neighborColumnGap); } else { - m_animation->setFrameRange(-m_contentX, -newContentX); + m_animation->setFrameRange(-m_contentX, -newContentX + neighborColumnGap); } if (m_animation->state() != QTimeLine::Running) { m_animation->start(); @@ -279,9 +279,9 @@ void DolphinColumnViewContainer::slotAssureVisibleActiveColumn() } else if (x < 0) { const int newContentX = m_contentX - x; if (isRightToLeft()) { - m_animation->setFrameRange(m_contentX, newContentX); + m_animation->setFrameRange(m_contentX, newContentX - neighborColumnGap); } else { - m_animation->setFrameRange(-m_contentX, -newContentX - previousColumnGap); + m_animation->setFrameRange(-m_contentX, -newContentX - neighborColumnGap); } if (m_animation->state() != QTimeLine::Running) { m_animation->start(); |
