From f2f1a93c58b6cb88f3cd0655e95ccd5ad99286d0 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 7 Aug 2019 21:36:41 +0200 Subject: [PATCH] QToolBarLayout: fix position calculation Fix a bug introduced in d493f676a38f000dd9c22dee6eea2b5ae4291e0a while calculating the size / position of the layout item. Fixes: QTBUG-77115 Change-Id: I20ad1685659da7225009734e25287e590367aa9e Reviewed-by: Richard Moe Gustavsen --- src/widgets/widgets/qtoolbarlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp index d50e19a5ed..961a261e8f 100644 --- a/src/widgets/widgets/qtoolbarlayout.cpp +++ b/src/widgets/widgets/qtoolbarlayout.cpp @@ -533,7 +533,7 @@ bool QToolBarLayout::layoutActions(const QSize &size) if (expanded) rperp(o, size) = rowHeight; else - rperp(o, size) = perp(o, rect.size()) - perp(o, QSize(margins.top(), margins.left())); + rperp(o, size) = perp(o, rect.size()) - perp(o, margins); QRect r(pos, size); if (o == Qt::Horizontal)