aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qquickmaterialstyle.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-08-19 15:44:26 +0200
committerMitch Curtis <mitch.curtis@qt.io>2016-08-19 14:11:49 +0000
commitacf84ce9f386f7e8ab0ecea03a8247ce97c363a1 (patch)
treef3442400566e6b754a696beab3211c438975c2c9 /src/imports/controls/material/qquickmaterialstyle.cpp
parentdd5f02754320086797e83bb77418c995d6b4d522 (diff)
Material: document the attached style properties
Change-Id: I8349ec366c75b9480533bb9b61a3748e09e9560e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/material/qquickmaterialstyle.cpp')
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index beb2b49b..9361e535 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -369,6 +369,9 @@ static const QRgb colors[][14] = {
}
};
+// If no value was inherited from a parent or explicitly set, the "global" values are used.
+// The initial, default values of the globals are hard-coded here, but the environment
+// variables and .conf file override them if specified.
static QQuickMaterialStyle::Theme globalTheme = QQuickMaterialStyle::Light;
static uint globalPrimary = QQuickMaterialStyle::Indigo;
static uint globalAccent = QQuickMaterialStyle::Pink;
@@ -378,6 +381,8 @@ static uint globalBackground = 0xFFFAFAFA; // backgroundColorLight
// Each style's m_hasForeground/m_hasBackground are initialized to these values.
static bool hasGlobalForeground = false;
static bool hasGlobalBackground = false;
+// These represent whether or not the global color value was specified as one of the
+// values that QColor accepts, as opposed to one of the pre-defined colors like Red.
static bool globalPrimaryCustom = false;
static bool globalAccentCustom = false;
static bool globalForegroundCustom = true;