diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-03-28 12:48:37 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-03-28 11:12:43 +0000 |
commit | 4ff021d3cbe11ffd6132d2b4c7ad735c1ee85d14 (patch) | |
tree | e53985e3f31db62470fb2c27294ed6bf8801681f /tests/auto/controls/data/tst_scrollindicator.qml | |
parent | 113d6f0670482706fd8184128175ad19cfd0c4a9 (diff) |
ScrollIndicator: add horizontal and vertical properties for convenience
[ChangeLog][Controls][ScrollIndicator] Added horizontal and vertical
properties to make it more convenient to create orientation-dependent
bindings in styles.
Change-Id: I8670456bb84387af99440ba25ab652c07ec1cb29
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_scrollindicator.qml')
-rw-r--r-- | tests/auto/controls/data/tst_scrollindicator.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_scrollindicator.qml b/tests/auto/controls/data/tst_scrollindicator.qml index 54cd7159..1e28c4f5 100644 --- a/tests/auto/controls/data/tst_scrollindicator.qml +++ b/tests/auto/controls/data/tst_scrollindicator.qml @@ -217,4 +217,18 @@ TestCase { compare(horizontal.contentItem.x, horizontal.leftPadding + 0.8 * horizontal.availableWidth) compare(horizontal.contentItem.width, 0.2 * horizontal.availableWidth) } + + function test_orientation() { + var control = createTemporaryObject(scrollIndicator, testCase) + verify(control) + + compare(control.orientation, Qt.Vertical) + compare(control.horizontal, false) + compare(control.vertical, true) + + control.orientation = Qt.Horizontal + compare(control.orientation, Qt.Horizontal) + compare(control.horizontal, true) + compare(control.vertical, false) + } } |