diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/qtoolbar.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qtoolbarlayout.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qtoolbarlayout_p.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index bf44ea1..89e6d7a 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -391,7 +391,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event) void QToolBarPrivate::unplug(const QRect &_r) { Q_Q(QToolBar); - + layout->setExpanded(false, false); QRect r = _r; r.moveTopLeft(q->mapToGlobal(QPoint(0, 0))); setWindowState(true, true, r); diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp index d3c5b4b..1f2ca60 100644 --- a/src/gui/widgets/qtoolbarlayout.cpp +++ b/src/gui/widgets/qtoolbarlayout.cpp @@ -642,7 +642,7 @@ QSize QToolBarLayout::expandedSize(const QSize &size) const return result; } -void QToolBarLayout::setExpanded(bool exp) +void QToolBarLayout::setExpanded(bool exp, bool animated) { if (exp == expanded) return; @@ -665,7 +665,7 @@ void QToolBarLayout::setExpanded(bool exp) layoutActions(rect.size()); } } - layout->layoutState.toolBarAreaLayout.apply(true); + layout->layoutState.toolBarAreaLayout.apply(animated); } } diff --git a/src/gui/widgets/qtoolbarlayout_p.h b/src/gui/widgets/qtoolbarlayout_p.h index fe81d2f..bb40e215 100644 --- a/src/gui/widgets/qtoolbarlayout_p.h +++ b/src/gui/widgets/qtoolbarlayout_p.h @@ -111,8 +111,8 @@ public: void updateMarginAndSpacing(); bool hasExpandFlag() const; -public slots: - void setExpanded(bool b); +public Q_SLOTS: + void setExpanded(bool b, bool animated = true); private: QList<QToolBarItem*> items; |