diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-02-12 10:20:06 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-02-19 15:48:03 +0000 |
commit | 55fa922b4f9350c320a4a949b70498269f0aaf79 (patch) | |
tree | aef0292380fc40dd639cfea93d1ad503bf2bb122 /src/imports/controls/doc | |
parent | a57754609cec57d1298bbcd1206fb0f114c7610e (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/doc')
-rw-r--r-- | src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc b/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc index c5d94279..72c97bb6 100644 --- a/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc +++ b/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc @@ -8,6 +8,14 @@ \li Specifies the default \l {material-theme-attached-prop}{Material theme}. The value can be one of the available themes, for example \c "Dark". \row + \li \c Variant + \li Specifies the Material variant. The Material Design has two + variants: a normal variant designed for touch devices, and a dense + variant for desktop. The dense variant uses smaller sizes for + controls and their fonts. + + The value can be \c "Normal" or \c "Dense". + \row \li \c Accent \li Specifies the default \l {material-accent-attached-prop}{Material accent color}. The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use @@ -40,6 +48,14 @@ \li Specifies the default \l {material-theme-attached-prop}{Material theme}. The value can be one of the available themes, for example \c "Dark". \row + \li \c QT_QUICK_CONTROLS_MATERIAL_VARIANT + \li Specifies the Material variant. The Material Design has two + variants: a normal variant designed for touch devices, and a dense + variant for desktop. The dense variant uses smaller sizes for + controls and their fonts. + + The value can be \c "Normal" or \c "Dense". + \row \li \c QT_QUICK_CONTROLS_MATERIAL_ACCENT \li Specifies the default \l {material-accent-attached-prop}{Material accent color}. The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use |