diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2020-10-26 13:50:08 +0100 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2020-10-26 14:07:55 +0100 |
commit | 04913fefc9f628407fbc432fc903bbb1559de42e (patch) | |
tree | 06ee83b6acaa35e90e5de67cbc0c4ce5b791b10e /src/imports/nativestyle/items/qquickstyleitem.h | |
parent | 9a15b53e1ddf07807ca03cce7cd4321f4f11911d (diff) |
Native style: Fix bug in layoutMargins()
It should return margin of 0 if
style()->subElementRect(XXXLayoutItem)
returned an invalid rect.
This means that we cannot rely on m_styleItemGeometry.layoutRect
blindly.
Change-Id: If6b5a40481c8199a63f3446abc9e7dd1c670d181
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/imports/nativestyle/items/qquickstyleitem.h')
-rw-r--r-- | src/imports/nativestyle/items/qquickstyleitem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/nativestyle/items/qquickstyleitem.h b/src/imports/nativestyle/items/qquickstyleitem.h index 2c8c9920..4e4180c1 100644 --- a/src/imports/nativestyle/items/qquickstyleitem.h +++ b/src/imports/nativestyle/items/qquickstyleitem.h @@ -144,7 +144,7 @@ struct StyleItemGeometry QSize minimumSize; QSize implicitSize; QRect contentRect; - QRect layoutRect; + QRect layoutRect; //If invalid, there are no layout margins! QMargins ninePatchMargins; qreal focusFrameRadius; }; |