diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-03-01 17:43:45 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-04 15:07:12 +0000 |
commit | 449ebc4fbc26db7b8ef4091f780163e3045b97c7 (patch) | |
tree | acaf476ffff80dbca05aaeda418ba78307665933 /src/quicktemplates2/qquickcontrol_p_p.h | |
parent | f249c3d30de43e6f0e4f8905f8a4090a912b0a08 (diff) |
QQuickControl: update baseline offset automatically
...unless explicitly defined. All buttons repeated the same binding.
[ChangeLog][Controls][Control] Unless explicitly specified, baselineOffset
is now automatically updated based on the top padding of the control and
the baselineOffset of the contentItem. Styles no longer need to specify
the baselineOffset in QML.
Change-Id: I9c6f61371fee05a06b5dd31b27d8baf9da0bdeeb
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcontrol_p_p.h b/src/quicktemplates2/qquickcontrol_p_p.h index 250c383b..6243341d 100644 --- a/src/quicktemplates2/qquickcontrol_p_p.h +++ b/src/quicktemplates2/qquickcontrol_p_p.h @@ -79,6 +79,8 @@ public: return control->d_func(); } + void init(); + #if QT_CONFIG(quicktemplates2_multitouch) virtual bool acceptTouch(const QTouchEvent::TouchPoint &point); #endif @@ -154,12 +156,15 @@ public: virtual void cancelBackground(); virtual void executeBackground(bool complete = false); + void updateBaselineOffset(); + struct ExtraData { ExtraData(); bool hasTopPadding; bool hasLeftPadding; bool hasRightPadding; bool hasBottomPadding; + bool hasBaselineOffset; qreal topPadding; qreal leftPadding; qreal rightPadding; |