diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-04-25 14:09:11 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-25 14:08:03 +0000 |
commit | bafe2ca913f6268829088326b86ec90b41277c36 (patch) | |
tree | 2a6ad5aa706174315614e3f6df26d7f9511078c7 /src/imports/controls/material/qquickmaterialstyle.cpp | |
parent | a55ec55a13e4105fd3facdada1c2899190c52828 (diff) |
Material: use background insets
Allows easily configuring the insets from the outside. Buttons have
normally 6px insets, but for example a large Floating Action Button
doesn't.
Task-number: QTBUG-60156
Change-Id: I49121c5bd588ff83e7ab9032de42a93872e999e4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/qquickmaterialstyle.cpp')
-rw-r--r-- | src/imports/controls/material/qquickmaterialstyle.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp index 365392a1..5cbd87ea 100644 --- a/src/imports/controls/material/qquickmaterialstyle.cpp +++ b/src/imports/controls/material/qquickmaterialstyle.cpp @@ -1145,6 +1145,12 @@ int QQuickMaterialStyle::touchTarget() const return globalVariant == Dense ? 44 : 48; } +int QQuickMaterialStyle::buttonHeight() const +{ + // https://material.io/guidelines/components/buttons.html#buttons-style + return globalVariant == Dense ? 32 : 36; +} + int QQuickMaterialStyle::delegateHeight() const { // https://material.io/guidelines/components/lists.html#lists-specs |