summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-15 13:29:26 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-15 13:29:26 (GMT)
commit07f724cd5abd0548fb32ed3469bde113daf028c4 (patch)
treecbc086e99d0f59ccde3ac314d6165e7806fc613a /src/gui/itemviews
parentc5a0190054421ac5c3325bba6835b63c70b6bda2 (diff)
parentb53f7d4ce3d5d9af47daf78c9f831acc532e688b (diff)
downloadQt-07f724cd5abd0548fb32ed3469bde113daf028c4.zip
Qt-07f724cd5abd0548fb32ed3469bde113daf028c4.tar.gz
Qt-07f724cd5abd0548fb32ed3469bde113daf028c4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QListView: Re-fix scrollbar ranges Fix compile error with QT_NO_GRAPHICSVIEW in QtMultimedia Fix compile error with QT_NO_IMAGEFORMAT_XPM in QtGui Wrap EGL image function pointers and move into QEgl namespace Fix compilation of ShivaVG, which does not have EGL. Move nativePaintingActive flag to GL2 engine's private More adjustments to QTBUG-6800 Adjustments to QTBUG-6800 patch. QTBUG-6800 patch included, but only for OpenGL 2.0 Support building with desktop OpenGL managed via EGL Print more information when debugging X11 Visual selection Fix gcc compile warning in qstatictext.cpp Avoid taking sqrt of negative number in FT font engine
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qlistview.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 39ca75a..1869093 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -1853,14 +1853,14 @@ void QCommonListViewBase::updateHorizontalScrollBar(const QSize &step)
{
horizontalScrollBar()->setSingleStep(step.width() + spacing());
horizontalScrollBar()->setPageStep(viewport()->width());
- horizontalScrollBar()->setRange(0, contentsSize.width() - viewport()->width() - 2 * spacing());
+ horizontalScrollBar()->setRange(0, contentsSize.width() - viewport()->width());
}
void QCommonListViewBase::updateVerticalScrollBar(const QSize &step)
{
verticalScrollBar()->setSingleStep(step.height() + spacing());
verticalScrollBar()->setPageStep(viewport()->height());
- verticalScrollBar()->setRange(0, contentsSize.height() - viewport()->height() - 2 * spacing());
+ verticalScrollBar()->setRange(0, contentsSize.height() - viewport()->height());
}
void QCommonListViewBase::scrollContentsBy(int dx, int dy, bool /*scrollElasticBand*/)
@@ -2276,6 +2276,7 @@ void QListModeViewBase::doStaticLayout(const QListViewLayoutInfo &info)
const QPoint topLeft = initStaticLayout(info);
QStyleOptionViewItemV4 option = viewOptions();
option.rect = info.bounds;
+ option.rect.adjust(info.spacing, info.spacing, -info.spacing, -info.spacing);
// The static layout data structures are as follows:
// One vector contains the coordinate in the direction of layout flow.
@@ -2905,8 +2906,13 @@ void QIconModeViewBase::doDynamicLayout(const QListViewLayoutInfo &info)
batchStartRow = info.last + 1;
bool done = (info.last >= rowCount() - 1);
// resize the content area
- if (done || !info.bounds.contains(item->rect()))
- contentsSize = QSize(rect.width(), rect.height());
+ if (done || !info.bounds.contains(item->rect())) {
+ contentsSize = rect.size();
+ if (info.flow == QListView::LeftToRight)
+ contentsSize.rheight() += info.spacing;
+ else
+ contentsSize.rwidth() += info.spacing;
+ }
// resize tree
int insertFrom = info.first;
if (done || info.first == 0) {