aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qquickmaterialstyle_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-04-25 14:03:11 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-04-25 14:08:00 +0000
commita55ec55a13e4105fd3facdada1c2899190c52828 (patch)
tree1a75d3ac878d4fd71e074c3074ce7ae33aa5516d /src/imports/controls/material/qquickmaterialstyle_p.h
parentc45021e68a9aa4d1bb5286a65a9f3d5a719c7c65 (diff)
Replace Material.buttonHeight with Material.touchTarget
The visual height of a Material design Button is 36px in the normal variant, and 32px in the dense variant. The Button has 6px vertical insets to gain 48px touch target height. Rename the old buttonHeight property as touchTarget to make room for the visual buttonHeight that is needed when porting Button to use the newly introduced background insets. Change-Id: Ic2932f71ca75a626ff5e9b0ce9930e1b3f24cf00 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/qquickmaterialstyle_p.h')
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index 0cb168a9..31b63ca1 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -98,7 +98,7 @@ class QQuickMaterialStyle : public QQuickAttachedObject
Q_PROPERTY(QColor toolTextColor READ toolTextColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor spinBoxDisabledIconColor READ spinBoxDisabledIconColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(int buttonHeight READ buttonHeight CONSTANT FINAL)
+ Q_PROPERTY(int touchTarget READ touchTarget CONSTANT FINAL)
Q_PROPERTY(int delegateHeight READ delegateHeight CONSTANT FINAL)
Q_PROPERTY(int dialogButtonBoxHeight READ dialogButtonBoxHeight CONSTANT FINAL)
Q_PROPERTY(int frameVerticalPadding READ frameVerticalPadding CONSTANT FINAL)
@@ -240,7 +240,7 @@ public:
Q_INVOKABLE QColor color(Color color, Shade shade = Shade500) const;
Q_INVOKABLE QColor shade(const QColor &color, Shade shade) const;
- int buttonHeight() const;
+ int touchTarget() const;
int delegateHeight() const;
int dialogButtonBoxHeight() const;
int frameVerticalPadding() const;