diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-09 14:08:24 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-09 14:08:24 +0200 |
commit | 6a6eaec0e8c2d4cd1ffbe2fe154a3a3caad54dc9 (patch) | |
tree | 5d8352f302bc979332eed01e250554b69961311e /src/imports/controls/doc/src/qtquickcontrols2-material.qdoc | |
parent | c02d23360186b43fcd570e1c7fc666cb14b487d6 (diff) | |
parent | b172b30368bafc839b92f767324496a509267fc7 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/quicktemplates2/qquickpage.cpp
Change-Id: I4c8b62fb1d7c20c6d3c870eb47e0402a20051098
Diffstat (limited to 'src/imports/controls/doc/src/qtquickcontrols2-material.qdoc')
-rw-r--r-- | src/imports/controls/doc/src/qtquickcontrols2-material.qdoc | 96 |
1 files changed, 72 insertions, 24 deletions
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc index 32660ff7..818ad7fd 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc @@ -37,17 +37,17 @@ \section1 Attached Properties \list - \li \l {accent-attached-prop}{\b accent} : color - \li \l {background-attached-prop}{\b background} : color - \li \l {foreground-attached-prop}{\b foreground} : color - \li \l {primary-attached-prop}{\b primary} : color - \li \l {theme-attached-prop}{\b theme} : enumeration + \li \l {material-accent-attached-prop}{\b accent} : color + \li \l {material-background-attached-prop}{\b background} : color + \li \l {material-foreground-attached-prop}{\b foreground} : color + \li \l {material-primary-attached-prop}{\b primary} : color + \li \l {material-theme-attached-prop}{\b theme} : enumeration \endlist \section1 Attached Methods \list - \li color \l {color-attached-method}{\b color}(enumeration predefined) + \li color \l {material-color-attached-method}{\b color}(enumeration predefined, enumeration shade) \endlist \section1 Detailed Description @@ -60,6 +60,9 @@ \image qtquickcontrols2-material.png \caption The Material style in light and dark themes + To run an application with the Material style, see + \l {Using Styles in Qt Quick Controls 2}. + \note The Material style is not a native Android style. The Material style is a 100% cross-platform Qt Quick Controls 2 style implementation that follows the Google Material Design Guidelines. The style runs on any @@ -69,9 +72,9 @@ \section2 Customization - The Material style allows customizing five attributes, \l {theme-attached-prop}{theme}, - \l {primary-attached-prop}{primary}, \l {accent-attached-prop}{accent}, - \l {foreground-attached-prop}{foreground}, and \l {background-attached-prop}{background}. + The Material style allows customizing five attributes, \l {material-theme-attached-prop}{theme}, + \l {material-primary-attached-prop}{primary}, \l {material-accent-attached-prop}{accent}, + \l {material-foreground-attached-prop}{foreground}, and \l {material-background-attached-prop}{background}. \image qtquickcontrols2-material-attributes.png @@ -141,7 +144,7 @@ \li Description \row \li \c QT_QUICK_CONTROLS_MATERIAL_THEME - \li The value can be one of the available \l {theme-attached-prop}{themes}, + \li The value can be one of the available \l {material-theme-attached-prop}{themes}, for example \c "Dark". \row \li \c QT_QUICK_CONTROLS_MATERIAL_ACCENT @@ -206,12 +209,56 @@ \value Material.Grey \stylecolor {#9E9E9E} {} \value Material.BlueGrey \stylecolor {#607D8B} {} + When the dark theme is in use, different \l {Pre-defined Shades}{shades} of + the pre-defined colors are used by default: + + \value Material.Red \stylecolor {#EF9A9A} {} + \value Material.Pink \stylecolor {#F48FB1} {(default accent)} + \value Material.Purple \stylecolor {#CE93D8} {} + \value Material.DeepPurple \stylecolor {#B39DDB} {} + \value Material.Indigo \stylecolor {#9FA8DA} {(default primary)} + \value Material.Blue \stylecolor {#90CAF9} {} + \value Material.LightBlue \stylecolor {#81D4FA} {} + \value Material.Cyan \stylecolor {#80DEEA} {} + \value Material.Teal \stylecolor {#80CBC4} {} + \value Material.Green \stylecolor {#A5D6A7} {} + \value Material.LightGreen \stylecolor {#C5E1A5} {} + \value Material.Lime \stylecolor {#E6EE9C} {} + \value Material.Yellow \stylecolor {#FFF59D} {} + \value Material.Amber \stylecolor {#FFE082} {} + \value Material.Orange \stylecolor {#FFCC80} {} + \value Material.DeepOrange \stylecolor {#FFAB91} {} + \value Material.Brown \stylecolor {#BCAAA4} {} + \value Material.Grey \stylecolor {#EEEEEE} {} + \value Material.BlueGrey \stylecolor {#B0BEC5} {} + + \section2 Pre-defined Shades + + There are several different + \l {https://material.google.com/style/color.html#color-color-palette}{shades} + of each \l {Pre-defined Colors}{pre-defined color} that can be passed to the + \l {material-color-attached-method}{Material.color()} function: + \value Material.Shade50 + \value Material.Shade100 + \value Material.Shade200 + \value Material.Shade300 + \value Material.Shade400 + \value Material.Shade500 + \value Material.Shade600 + \value Material.Shade700 + \value Material.Shade800 + \value Material.Shade900 + \value Material.ShadeA100 + \value Material.ShadeA200 + \value Material.ShadeA400 + \value Material.ShadeA700 + \b {See also} \l {Default Style}, \l {Universal Style} \section1 Attached Property Documentation - \styleproperty {Material.accent} {color} {accent-attached-prop} - \target accent-attached-prop + \styleproperty {Material.accent} {color} {material-accent-attached-prop} + \target material-accent-attached-prop This attached property holds the accent color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -223,8 +270,8 @@ \endstyleproperty - \styleproperty {Material.background} {color} {background-attached-prop} - \target background-attached-prop + \styleproperty {Material.background} {color} {material-background-attached-prop} + \target material-background-attached-prop This attached property holds the background color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -232,8 +279,8 @@ \endstyleproperty - \styleproperty {Material.foreground} {color} {foreground-attached-prop} - \target foreground-attached-prop + \styleproperty {Material.foreground} {color} {material-foreground-attached-prop} + \target material-foreground-attached-prop This attached property holds the foreground color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -241,8 +288,8 @@ \endstyleproperty - \styleproperty {Material.primary} {color} {primary-attached-prop} - \target primary-attached-prop + \styleproperty {Material.primary} {color} {material-primary-attached-prop} + \target material-primary-attached-prop This attached property holds the primary color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -254,8 +301,8 @@ \endstyleproperty - \styleproperty {Material.theme} {enumeration} {theme-attached-prop} - \target theme-attached-prop + \styleproperty {Material.theme} {enumeration} {material-theme-attached-prop} + \target material-theme-attached-prop This attached property holds whether the theme is light or dark. The property can be attached to any window or item. The value is propagated to children. @@ -272,10 +319,11 @@ \section1 Attached Method Documentation - \stylemethod {color} {color} {enumeration} {predefined} {color-attached-method} - \target color-attached-method + \stylemethod2 {color} {color} {enumeration} {predefined} {enumeration} {shade} {material-color-attached-method} + \target material-color-attached-method This attached method returns the color value of the specified \l {pre-defined colors} - {pre-defined color}. + {pre-defined color} combined with the given \l {pre-defined colors}{shade}. + If omitted, the shade argument defaults to \c Material.Shade500. \qml import QtQuick 2.0 @@ -286,7 +334,7 @@ } \endqml - \endstylemethod + \endstylemethod2 \section1 Related Information |