summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qtoolbar.cpp2
-rw-r--r--src/gui/widgets/qtoolbarlayout.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp
index 58a3d28..c0ca015 100644
--- a/src/gui/widgets/qtoolbar.cpp
+++ b/src/gui/widgets/qtoolbar.cpp
@@ -396,10 +396,10 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event)
void QToolBarPrivate::unplug(const QRect &_r)
{
Q_Q(QToolBar);
- layout->setExpanded(false);
QRect r = _r;
r.moveTopLeft(q->mapToGlobal(QPoint(0, 0)));
setWindowState(true, true, r);
+ layout->setExpanded(false);
}
void QToolBarPrivate::plug(const QRect &r)
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp
index 0afe5d8..93429e4 100644
--- a/src/gui/widgets/qtoolbarlayout.cpp
+++ b/src/gui/widgets/qtoolbarlayout.cpp
@@ -654,6 +654,7 @@ void QToolBarLayout::setExpanded(bool exp)
if (!tb)
return;
if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) {
+ animating = !tb->isWindow() && win->isAnimated();
QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout());
if (expanded) {
tb->raise();
@@ -664,7 +665,7 @@ void QToolBarLayout::setExpanded(bool exp)
layoutActions(rect.size());
}
}
- layout->layoutState.toolBarAreaLayout.apply(win->isAnimated());
+ layout->layoutState.toolBarAreaLayout.apply(animating);
}
}