summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtoolbarlayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qtoolbarlayout.cpp')
-rw-r--r--src/gui/widgets/qtoolbarlayout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp
index 7dc1e01..93429e4 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, bool animated)
+void QToolBarLayout::setExpanded(bool exp)
{
if (exp == expanded)
return;
@@ -654,7 +654,7 @@ void QToolBarLayout::setExpanded(bool exp, bool animated)
if (!tb)
return;
if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) {
- animating = true;
+ animating = !tb->isWindow() && win->isAnimated();
QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout());
if (expanded) {
tb->raise();
@@ -665,7 +665,7 @@ void QToolBarLayout::setExpanded(bool exp, bool animated)
layoutActions(rect.size());
}
}
- layout->layoutState.toolBarAreaLayout.apply(animated);
+ layout->layoutState.toolBarAreaLayout.apply(animating);
}
}