summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_slider.qml
Commit message (Collapse)AuthorAgeFilesLines
* Tests_Slider::test_mouseWheel(): use fixed handle sizeMitch Curtis2017-12-181-3/+15
| | | | | | | | | | The default handle size is based off the height of text on the system that the test is run on. By making the size fixed, we remove the possibility for small differences in compare results. Task-number: QTBUG-65224 Change-Id: I14061a028360340c6b284fb450bf1252014dc9b2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta4Liang Qi2017-10-301-1/+14
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia33462a31303ae79f7a6ef26dc6065a0afeef3e1
| * Update slider handle position when maximum changesFrederik Gladhorn2017-10-101-1/+14
| | | | | | | | | | | | | | | | | | This is exactly the same as the minimum change, when the maximum is changed, the handle position needs to be re-evaluated. Task-number: QTBUG-63354 Change-Id: I13a67451190a3bb7915afe8e89501097c1dd3301 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-271-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ie6ad3e9490dcf85bd5deb4c6d7004a4aa8b81433
| * Slider: Don't suppress updates by dragThreshold on non-touchscreensUlf Hermann2017-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When using a mouse, you want a slider to react immediately to input, not only if you move beyond a certain threshold. With the threshold it is very hard to accurately position the slider. On touchscreens, the threshold is necessary to allow for unrelated events, like flicking views, to not interfere with the value. Change-Id: I6cb8252338f20de559e062e738118593ffc1e099 Task-number: QTBUG-47081 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Slider: add property to disable scroll wheelJason Erb2017-03-061-1/+8
|/ | | | | | | | | | | | | | Add a property to disable the scroll wheel for the Slider. This is useful if there is a scrollable list of sliders, because scrolling would be interrupted as soon as the mouse gets above a slider (whereby scrolling would change the slider value). By setting this property to false, a user can easily scroll through the list. [ChangeLog][Slider] add property to disable scroll wheel Task-number: QTBUG-59271 Change-Id: I9306638ef98f8a0a5035709a67cc1ee40713441a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-181-2/+38
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/controls/Private/qquickrangemodel.cpp src/controls/Private/qquickrangemodel_p.h src/controls/Private/qquickrangemodel_p_p.h src/layouts/qquicklayout.cpp tests/auto/controls/data/tst_rangemodel.qml Change-Id: I9c8f6326c6edf9ebb18dd538f76830e1b439ba8e
| * Slider: fix the handle's position when minimumValue is not 0Mitch Curtis2016-09-141-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __handlePos (badly named; it should be, e.g. __handleValueForPos) represents the value of the handle based on "fakeHandle"'s position. It is the result of range.valueForPosition() being called. However, the arguments to this function (fakeHandle.x and fakeHandle.y) don't always change when the values of the slider change, which leads to the x calculation for the handle delegate in SliderStyle having outdated information, causing the related bug. The fix for another bug already works around this issue by passing the relevant properties as arguments (which are ignored) to the function call. This is presumably done this way because it should be cheaper than forcing the JavaScript engine to evaluate a more clearly written expression where each related property is on its own line, for example. property real __handlePos: { range.positionAtMinimum, range.positionAtMaximum; return range.valueForPosition(__horizontal ? fakeHandle.x : fakeHandle.y); } In the case of the related bug, minimumValue has been updated, but __handlePos is still using the old value, causing the handle to be positioned incorrectly. So, we continue this tradition and add another property to the list of arguments. Task-number: QTBUG-51765 Change-Id: I40882872e668a867a8f5e5768244e199618bd769 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Correct scrolling direction when using SlidersMorten Johan Sørvig2016-03-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Account for OS X "direct"/"inverted"/"australian" scrolling. This ensures that a touchpad right/left/up/down flick will move the slider handle in the same direction as the flick. This takes advantage of the recent addition of QWheelEvent::inverted in qtbase Change-Id: If51ec6f0cbc12a042a92aa55964633c9521469a9 Task-number: QTBUG-35972 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Unify license header usageAntti Kokko2016-02-041-3/+13
|/ | | | | | | Updated BSD license headers Change-Id: I73d67dbc6dbbe7c58d2b9c301b46fb6163243095 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Skip controls tests when touch screen is present.Friedemann Kleint2015-11-171-0/+4
| | | | | | | Task-number: QTBUG-49359 Task-number: QTBUG-49360 Change-Id: I96ec6d46de189ec396ef26c0d059c65360da4ec0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Avoid real-rounding glitches near ends of a slider's range.Edward Welbourne2015-10-211-0/+27
| | | | | | | | | Floating point doesn't quite reliably satisfy certain standard identities of arithmetic ... Task-number: QTBUG-42358 Change-Id: I7417feedbfc1fd6f59510e0ee6d07d98ff7ddc46 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* BSD license for QML code in testsJ-P Nurmi2015-03-061-22/+26
| | | | | | Change-Id: Ie45c9b8d5a5d7f92e4b835473b0c76e3a83998b5 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Use TabFocusBehavior in QStyleHints in QtQuick.ControlsLiang Qi2015-02-131-1/+1
| | | | | | | The all usages of qt_tab_all_widgets in test were updated. Change-Id: I35393c67f183c4e0695e869553007ea00d38c06a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Tests: update license headersJ-P Nurmi2015-02-111-29/+25
| | | | | | | Change-Id: I364c2ee1983f59f4c1b3e4e411b46f71c85599ee Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Slider: don't clamp to the initial press pointJ-P Nurmi2014-11-071-0/+25
| | | | | Change-Id: I5115bbab670f534dae44eb19c2208aff21293889 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Slider: Hover only on the handleGabriel de Dietrich2014-10-311-0/+4
| | | | | | | | | | Most styles rely on the handle being hovered, not the whole slider. [ChangeLog][Slider] The hovered property is set only when the handle is hovered, not anymore on the groove Change-Id: I749b076c98fba8e344218e46637ec00d24c0250c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix Slider increments on keypressFrederik Gladhorn2014-05-261-3/+11
| | | | | | | | | Instead of always adding/subtracting 1/10 of the range use the step size when the arrow keys are pressed. In addition add accessible actions to inc/dec the value. Task-number: QTBUG-39099 Change-Id: I4fdf2adc8912ab1fa8838be56af4e798eeb59781 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-071-10/+10
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Import QtQuick 2.2J-P Nurmi2014-04-071-3/+3
| | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig2013-09-101-11/+11
| | | | | Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Fix warning in Slider when stepSize is setJens Bache-Wiig2013-06-041-0/+11
| | | | | | | | | Also adding a new test for stepSize Task-number: QTBUG-31441 Change-Id: Ib8d9cc2188b5f73b6b0ac866ade1a7edb1d662b7 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Slider: pressing the handle should not change the slider positionJens Bache-Wiig2013-05-231-0/+14
| | | | | | | | | | We have to maintain the handle offset until the drag operation has ended. If the user clicks outside the handle, we center on the cursor position as before. Task-number: QTBUG-31042 Change-Id: I8f23d998774278c6353d31b6fffea54596f7158e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix various issues with sliderJens Bache-Wiig2013-05-221-5/+14
| | | | | | | | | | | - Fixed missing press appearance of slider handle - Removed drag threshold when pulling handle - Ensure handle stays connected to mouse cursor by giving the fake handle size Task-number: QTBUG-31042 Change-Id: I289a48b5fa67dde2792590645b8630a7ae6518d9 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Mac: respect the system settings in Full Keyboard AccessLiang Qi2013-05-151-0/+4
| | | | | | | | Because we use TableView as ListView, then only SpinBox, TextField, TextAre and TableView could be selected. Change-Id: I65ca106e60a57d86e029647653ae110fd81edaa4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Tests: Add test for updateValueWhileDragging property (Slider)Caroline Chao2013-04-291-0/+31
| | | | | Change-Id: I8650cb02f0db261462ebec816e80ec5c89fec8a7 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Tests: add more tests for activeFocusOnTab propertyCaroline Chao2013-04-121-0/+69
| | | | | | | Qml tests. Change-Id: I0b0f8b9de7a6e0da97a94eb9476e985f3539055a Reviewed-by: Liang Qi <liang.qi@digia.com>
* Tests: Destroy created components at the end of the tests functionsCaroline Chao2013-04-111-1/+6
| | | | | | | To ensure the components don't interfere with other functions. Change-Id: Ie22311471021175d23ae47c9e3a1ec603e803f2c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Tests: Add test for activeFocusOnPress propertyCaroline Chao2013-04-031-0/+12
| | | | | | | | | | | | | | | For - SpinBox - TextField - TextArea - ToolButton - Button - CheckBox - RadioButton - Slider Change-Id: I36c82c5058cfc9493d9fdb8c96c6612b1f387c0f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Slider: Fix increment/decrement on mouseWheelCaroline Chao2013-04-021-29/+93
| | | | | | | | | | | Remove unused internal inverted Update autotests Add a couple of properties to the testbench Change-Id: I149726f0f896ce2d1fd641a7c24d1268b9d891d2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Change imports from QtQuick 2.0 to QtQuick 2.1Caroline Chao2013-03-141-1/+1
| | | | | | Change-Id: If9df032c76e36f385aacd30cc31d6f02574c6f11 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix Vertical sliderJens Bache-Wiig2013-03-041-0/+8
| | | | | | | Task-number: 1303 Change-Id: Ic6cefcf456ef1a9801574096908cb475cbd51606 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Replaced BSD with LGPL license to conform with Qt Project modulesShawn Rutledge2013-02-211-1/+1
| | | | | | | | We want to use the same license as the other Qt modules. QML files stay as BSD for now. Change-Id: I10b1484f5ab0dfe2138ff7e045d0ecfd85556aa1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Rename QtDesktop to QtQuick.ControlsJens Bache-Wiig2013-02-211-0/+70
Change-Id: Icc61dbfc74cc2a303b9847e7d2c7ace4a9002046 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>