aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcontrol_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-04-23 11:42:37 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-04-23 15:49:31 +0000
commit7e3c882d9a5cd6a25f547091a4ece786f516f2a4 (patch)
treeaf93fed4a300b68933ceb749187649668c7d3976 /src/quicktemplates2/qquickcontrol_p_p.h
parent12e22e333d99d1a2fe9d878bb86108c87626e7ec (diff)
Control: fix background size
Don't reset QQuickItemPrivate::widthValid and heightValid flags, because that will cause the item to update its geometry when its implicit size changes. Instead, keep track whether background has an explicit size at the time of assignment, or if the background changes its geometry outside of resizeBackground(). Task-number: QTBUG-66455 Change-Id: If14eeae6863f7e5e47ebf2d6dbdaf718fc8368d4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickcontrol_p_p.h')
-rw-r--r--src/quicktemplates2/qquickcontrol_p_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickcontrol_p_p.h b/src/quicktemplates2/qquickcontrol_p_p.h
index 757452a6..410c7811 100644
--- a/src/quicktemplates2/qquickcontrol_p_p.h
+++ b/src/quicktemplates2/qquickcontrol_p_p.h
@@ -170,11 +170,14 @@ public:
void updateBaselineOffset();
- void addImplicitSizeListener(QQuickItem *item);
- void removeImplicitSizeListener(QQuickItem *item);
+ static const ChangeTypes ImplicitSizeChanges;
+
+ void addImplicitSizeListener(QQuickItem *item, ChangeTypes changes = ImplicitSizeChanges);
+ void removeImplicitSizeListener(QQuickItem *item, ChangeTypes changes = ImplicitSizeChanges);
void itemImplicitWidthChanged(QQuickItem *item) override;
void itemImplicitHeightChanged(QQuickItem *item) override;
+ void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
void itemDestroyed(QQuickItem *item) override;
virtual qreal getContentWidth() const;
@@ -195,6 +198,8 @@ public:
bool hasLeftInset;
bool hasRightInset;
bool hasBottomInset;
+ bool hasBackgroundWidth;
+ bool hasBackgroundHeight;
qreal topPadding;
qreal leftPadding;
qreal rightPadding;
@@ -216,6 +221,7 @@ public:
bool hovered;
bool explicitHoverEnabled;
#endif
+ bool resizingBackground;
int touchId;
qreal padding;
qreal horizontalPadding;