diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-10-21 19:26:39 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-10-24 10:39:12 +0000 |
commit | 6f7d739bd6de6833ee049b8ba424c79e88c42ad7 (patch) | |
tree | 23859acee1fdd950d3d53eab89afe7a6128d218b | |
parent | f26f855e77e805bbe3b2c4b04a102441770ddb61 (diff) |
Material: sync ComboBox with Button
ComboBox is modeled after Material design's drop-down Button, but it
was never updated to have the same external padding that was added to
the Material style Button. Both should have the same visual size to
make them look sensible when laid out next to each other.
Change-Id: I350f4acb2ea29ba292dbfaea874c348ae57750a2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | src/imports/controls/material/ComboBox.qml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index 05981baa..183bcef9 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -54,7 +54,10 @@ T.ComboBox { baselineOffset: contentItem.y + contentItem.baselineOffset spacing: 6 - padding: 16 + // external vertical padding is 6 (to increase touch area) + padding: 12 + leftPadding: padding - 4 + rightPadding: padding - 4 // Don't use toolTextColor, as that is often white when we have a white background. Material.foreground: Material.foreground === Material.toolTextColor ? undefined : Material.foreground @@ -89,6 +92,9 @@ T.ComboBox { implicitWidth: 120 implicitHeight: 48 + // external vertical padding is 6 (to increase touch area) + y: 6 + height: parent.height - 12 radius: 2 color: control.Material.dialogColor |