diff options
author | ABBAPOH <ABBAPOH@nextmail.ru> | 2012-02-25 23:52:09 +0400 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-15 03:53:07 +0200 |
commit | 5cb2fbe088ee5b15c2a35ba175e3c39a2fac5c03 (patch) | |
tree | b3211293757a7b274dcb3d6fcb71248b61532569 /src/widgets/widgets/qsplitter.cpp | |
parent | 73b24486edd6b64165821bfb587cec9c9b078796 (diff) |
Now QSplitter can have 0-pixel handle
Change-Id: Iad920ffcd5d7f4c01504d41d1740f130b7aa53dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/widgets/widgets/qsplitter.cpp')
-rw-r--r-- | src/widgets/widgets/qsplitter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp index 285099a4cb..44c450ca47 100644 --- a/src/widgets/widgets/qsplitter.cpp +++ b/src/widgets/widgets/qsplitter.cpp @@ -232,14 +232,14 @@ void QSplitterHandle::resizeEvent(QResizeEvent *event) { Q_D(const QSplitterHandle); - // When splitters are only 1 pixel large we increase the + // When splitters are only 1 or 0 pixel large we increase the // actual grab area to five pixels // Note that QSplitter uses contentsRect for layouting // and ensures that handles are drawn on top of widgets // We simply use the contents margins for draggin and only // paint the mask area - bool useTinyMode = (d->s->handleWidth() == 1); + bool useTinyMode = (d->s->handleWidth() <= 1); setAttribute(Qt::WA_MouseNoMask, useTinyMode); if (useTinyMode) { if (orientation() == Qt::Horizontal) @@ -1528,14 +1528,14 @@ void QSplitter::setSizes(const QList<int> &list) By default, this property contains a value that depends on the user's platform and style preferences. - If you set handleWidth to 1, the actual grab area will grow to overlap a + If you set handleWidth to 1 or 0, the actual grab area will grow to overlap a few pixels of it's respective widgets. */ int QSplitter::handleWidth() const { Q_D(const QSplitter); - if (d->handleWidth > 0) { + if (d->handleWidth >= 0) { return d->handleWidth; } else { return style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this); |