summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-29 07:59:58 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-29 07:59:58 (GMT)
commit31dae3d294b932c4fb2934b713273433ff4aff7c (patch)
tree2d44d9c6c61adebca4efe0f494d6647c150e6711 /doc/src/declarative
parent20290c189bf00fc457ec7d1f82708a8df83adbc5 (diff)
downloadQt-31dae3d294b932c4fb2934b713273433ff4aff7c.zip
Qt-31dae3d294b932c4fb2934b713273433ff4aff7c.tar.gz
Qt-31dae3d294b932c4fb2934b713273433ff4aff7c.tar.bz2
Allow factor parameter to be passed to Qt.lighter() and Qt.darker()
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/globalobject.qdoc31
1 files changed, 27 insertions, 4 deletions
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index 6e6d253..85cbde2 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -166,10 +166,33 @@ If no format is specified the locale's short format is used. Alternatively, you
\section2 Functions
The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML.
-\section3 Qt.lighter(color baseColor)
-This function returns a color 50% lighter than \c baseColor. See QColor::lighter() for further details.
-\section3 Qt.darker(color baseColor)
-This function returns a color 50% darker than \c baseColor. See QColor::darker() for further details.
+\section3 Qt.lighter(color baseColor, real factor)
+This function returns a color lighter than \c baseColor by the \c factor provided.
+
+If the factor is greater than 1.0, this functions returns a lighter color.
+Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0,
+the return color is darker, but we recommend using the Qt.darker() function for this purpose.
+If the factor is 0 or negative, the return value is unspecified.
+
+The function converts the current RGB color to HSV, multiplies the value (V) component
+by factor and converts the color back to RGB.
+
+If \c factor is not supplied, returns a color 50% lighter than \c baseColor (factor 1.5).
+
+\section3 Qt.darker(color baseColor, real factor)
+This function returns a color darker than \c baseColor by the \c factor provided.
+
+If the factor is greater than 1.0, this function returns a darker color.
+Setting factor to 3.0 returns a color that has one-third the brightness.
+If the factor is less than 1.0, the return color is lighter, but we recommend using
+the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return
+value is unspecified.
+
+The function converts the current RGB color to HSV, divides the value (V) component
+by factor and converts the color back to RGB.
+
+If \c factor is not supplied, returns a color 50% darker than \c baseColor (factor 2.0).
+
\section3 Qt.tint(color baseColor, color tintColor)
This function allows tinting one color with another.