From bd1080e6a1c78bc65d01f5504bec82ad971d866f Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 7 Oct 2016 12:21:07 +0200 Subject: Slider: fix documentation review findings Expand detailed description. Also updated the GIF after the styling changes, and removed the PNGs. Change-Id: I6dee232f6766d6ee9595b1043a4bca78c2a09d78 Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickslider.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/quicktemplates2/qquickslider.cpp') diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp index d01f26b9..e0df7e69 100644 --- a/src/quicktemplates2/qquickslider.cpp +++ b/src/quicktemplates2/qquickslider.cpp @@ -54,21 +54,24 @@ QT_BEGIN_NAMESPACE Slider is used to select a value by sliding a handle along a track. - \table - \row \li \image qtquickcontrols2-slider-normal.png - \li A slider in its normal state. - \row \li \image qtquickcontrols2-slider-focused.png - \li A slider that has active focus. - \row \li \image qtquickcontrols2-slider-disabled.png - \li A slider that is disabled. - \endtable + In the example below, custom \l from, \l value, and \l to values are set: \code Slider { - value: 0.5 + from: 1 + value: 25 + to: 100 } \endcode + The \l position property is defined as a percentage of the control's size, + scaled within the range \c {0.0 - 1.0}. The \l visualPosition property is + the same, except that it is reversed in a + \l {Right-to-left User Interfaces}{right-to-left} application. The + visualPosition is useful for positioning the handle when styling Slider. + In the example above, \l visualPosition will be \c 0.24 in a left-to-right + application, and \c 0.76 in a right-to-left application. + \sa {Customizing Slider}, {Input Controls} */ -- cgit v1.2.3