diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-10-07 12:21:07 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2016-10-07 11:08:08 +0000 |
commit | bd1080e6a1c78bc65d01f5504bec82ad971d866f (patch) | |
tree | 159b2417bac42fe4c80bcf6eaa803ac713f883d4 /src | |
parent | 59813165989da88f7d4ecec97f952b691636d683 (diff) |
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 <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png | bin | 1019 -> 0 bytes | |||
-rw-r--r-- | src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png | bin | 1154 -> 0 bytes | |||
-rw-r--r-- | src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png | bin | 1154 -> 0 bytes | |||
-rw-r--r-- | src/imports/controls/doc/images/qtquickcontrols2-slider.gif | bin | 16972 -> 13697 bytes | |||
-rw-r--r-- | src/imports/controls/doc/images/qtquickcontrols2-slider.png | bin | 1117 -> 0 bytes | |||
-rw-r--r-- | src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml | 34 | ||||
-rw-r--r-- | src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml | 34 | ||||
-rw-r--r-- | src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml | 33 | ||||
-rw-r--r-- | src/imports/controls/doc/src/qtquickcontrols2-input.qdoc | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickslider.cpp | 21 |
10 files changed, 13 insertions, 111 deletions
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png Binary files differdeleted file mode 100644 index 919a9a2b..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png Binary files differdeleted file mode 100644 index e6c4179c..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png Binary files differdeleted file mode 100644 index e6c4179c..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif Binary files differindex 7cb84b56..2ee56334 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider.png b/src/imports/controls/doc/images/qtquickcontrols2-slider.png Binary files differdeleted file mode 100644 index 2e27a604..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider.png +++ /dev/null diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml deleted file mode 100644 index bde161aa..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -Slider { - value: 0.5 - enabled: false -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml deleted file mode 100644 index b32f8b5a..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -Slider { - value: 0.5 - focus: true -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml deleted file mode 100644 index 8363e862..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -Slider { - value: 0.5 -} diff --git a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc index 70d5f54c..c3583fd1 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc @@ -85,7 +85,7 @@ \section1 Slider Control - \image qtquickcontrols2-slider.png + \image qtquickcontrols2-slider.gif \l Slider is used to select a value by sliding a handle along a track. 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} */ |