aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/DialogButtonBox.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-02-12 10:20:06 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-02-19 15:48:03 +0000
commit55fa922b4f9350c320a4a949b70498269f0aaf79 (patch)
treeaef0292380fc40dd639cfea93d1ad503bf2bb122 /src/imports/controls/material/DialogButtonBox.qml
parenta57754609cec57d1298bbcd1206fb0f114c7610e (diff)
Add Dense Material style variant for desktop
The current Material style is based on the mobile variant of the design, which is far too large for desktop applications. From https://material.io/guidelines/components/lists.html#lists-usage: "When the mouse and keyboard are the primary input methods, measurements may be condensed to accommodate denser layouts." This patch adds a dense variant of the style where most controls like buttons and delegates are smaller in height and use smaller font sizes. Note that the Material design guidelines seem to distinguish between mobile, desktop and dense measurements, where "dense" seems to be a specialization of desktop. We cannot afford to/do not see sense in maintaining three separate variants, so the dense variant will be the only desktop version of the Material style. [ChangeLog][Material] Added Dense variant of the Material style for use on desktop platforms. Some controls are slightly smaller in height and use smaller font sizes. The variant can be enabled by setting QT_QUICK_CONTROLS_MATERIAL_VARIANT to Dense or setting Variant=Dense in the qtquickcontrols.conf file. Task-number: QTBUG-51109 Change-Id: I11846b7f6e61f7b5dcf3c146b18c220234a73ef2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/material/DialogButtonBox.qml')
-rw-r--r--src/imports/controls/material/DialogButtonBox.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/controls/material/DialogButtonBox.qml b/src/imports/controls/material/DialogButtonBox.qml
index 628e85f7..c3bea49f 100644
--- a/src/imports/controls/material/DialogButtonBox.qml
+++ b/src/imports/controls/material/DialogButtonBox.qml
@@ -62,7 +62,7 @@ T.DialogButtonBox {
contentItem: ListView {
implicitWidth: contentWidth
- implicitHeight: 48
+ implicitHeight: control.Material.buttonHeight
model: control.contentModel
spacing: control.spacing
@@ -72,7 +72,7 @@ T.DialogButtonBox {
}
background: PaddedRectangle {
- implicitHeight: 52
+ implicitHeight: control.Material.dialogButtonBoxHeight
radius: 2
color: control.Material.dialogColor
// Rounded corners should be only at the top or at the bottom