Merge lp:~lukas-kde/ubuntu-ui-toolkit/sliderStyleRTL into lp:ubuntu-ui-toolkit/staging
- sliderStyleRTL
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Zsombor Egri |
Approved revision: | 2146 |
Merged at revision: | 2143 |
Proposed branch: | lp:~lukas-kde/ubuntu-ui-toolkit/sliderStyleRTL |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Diff against target: |
74 lines (+27/-2) 3 files modified
src/imports/Components/Themes/Ambiance/1.2/SliderStyle.qml (+1/-1) src/imports/Components/Themes/Ambiance/1.3/SliderStyle.qml (+1/-1) tests/unit/visual/tst_slider.13.qml (+25/-0) |
To merge this branch: | bzr merge lp:~lukas-kde/ubuntu-ui-toolkit/sliderStyleRTL |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Approve | |
Zsombor Egri | Approve | ||
Review via email: mp+309461@code.launchpad.net |
Commit message
Fix slider progress rect with RTL languages
Description of the change
Fix slider progress rect with RTL languages
Before: http://
After: http://
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2143
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2143
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2143
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2143
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2143
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2144. By Lukáš Tinkl
-
add a test for LTR/RTL Slider
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2144
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2144
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2144
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2144
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2144
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2144
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2145. By Lukáš Tinkl
-
move the property inside the slider
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2145
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2145
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2145
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2145
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2145
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2145
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2146. By Lukáš Tinkl
-
move the test to visual
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2146
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2146
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'src/imports/Components/Themes/Ambiance/1.2/SliderStyle.qml' | |||
2 | --- src/imports/Components/Themes/Ambiance/1.2/SliderStyle.qml 2015-04-24 14:43:08 +0000 | |||
3 | +++ src/imports/Components/Themes/Ambiance/1.2/SliderStyle.qml 2016-10-31 14:33:54 +0000 | |||
4 | @@ -48,7 +48,7 @@ | |||
5 | 48 | overlayColor: sliderStyle.foregroundColor | 48 | overlayColor: sliderStyle.foregroundColor |
6 | 49 | overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ? | 49 | overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ? |
7 | 50 | Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) : | 50 | Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) : |
9 | 51 | Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0) | 51 | Qt.rect(thumb.x / thumb.barMinusThumbWidth, 0.0, 1 - (thumb.x / thumb.barMinusThumbWidth), 1.0) |
10 | 52 | } | 52 | } |
11 | 53 | 53 | ||
12 | 54 | UbuntuShape { | 54 | UbuntuShape { |
13 | 55 | 55 | ||
14 | === modified file 'src/imports/Components/Themes/Ambiance/1.3/SliderStyle.qml' | |||
15 | --- src/imports/Components/Themes/Ambiance/1.3/SliderStyle.qml 2016-02-10 17:46:21 +0000 | |||
16 | +++ src/imports/Components/Themes/Ambiance/1.3/SliderStyle.qml 2016-10-31 14:33:54 +0000 | |||
17 | @@ -49,7 +49,7 @@ | |||
18 | 49 | overlayColor: sliderStyle.foregroundColor | 49 | overlayColor: sliderStyle.foregroundColor |
19 | 50 | overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ? | 50 | overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ? |
20 | 51 | Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) : | 51 | Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) : |
22 | 52 | Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0) | 52 | Qt.rect(thumb.x / thumb.barMinusThumbWidth, 0.0, 1 - (thumb.x / thumb.barMinusThumbWidth), 1.0) |
23 | 53 | } | 53 | } |
24 | 54 | 54 | ||
25 | 55 | UbuntuShape { | 55 | UbuntuShape { |
26 | 56 | 56 | ||
27 | === modified file 'tests/unit/visual/tst_slider.13.qml' | |||
28 | --- tests/unit/visual/tst_slider.13.qml 2016-06-15 13:46:51 +0000 | |||
29 | +++ tests/unit/visual/tst_slider.13.qml 2016-10-31 14:33:54 +0000 | |||
30 | @@ -89,6 +89,14 @@ | |||
31 | 89 | } | 89 | } |
32 | 90 | } | 90 | } |
33 | 91 | } | 91 | } |
34 | 92 | Slider { | ||
35 | 93 | property bool enableRTL: false | ||
36 | 94 | LayoutMirroring.enabled: enableRTL | ||
37 | 95 | LayoutMirroring.childrenInherit: enableRTL | ||
38 | 96 | |||
39 | 97 | id: slider | ||
40 | 98 | readonly property rect bar: slider.__styleInstance && slider.__styleInstance.bar ? slider.__styleInstance.bar.overlayRect : null | ||
41 | 99 | } | ||
42 | 92 | } | 100 | } |
43 | 93 | 101 | ||
44 | 94 | UbuntuTestCase { | 102 | UbuntuTestCase { |
45 | @@ -107,6 +115,7 @@ | |||
46 | 107 | function cleanup() { | 115 | function cleanup() { |
47 | 108 | flickSpy.target = null; | 116 | flickSpy.target = null; |
48 | 109 | flickSpy.clear(); | 117 | flickSpy.clear(); |
49 | 118 | slider.enableRTL = false; | ||
50 | 110 | } | 119 | } |
51 | 111 | 120 | ||
52 | 112 | function test_slider_blocks_flickable_data() { | 121 | function test_slider_blocks_flickable_data() { |
53 | @@ -160,5 +169,21 @@ | |||
54 | 160 | valueSpy.wait(); | 169 | valueSpy.wait(); |
55 | 161 | compare(slider.value, to, "Slider has the wrong value!"); | 170 | compare(slider.value, to, "Slider has the wrong value!"); |
56 | 162 | } | 171 | } |
57 | 172 | |||
58 | 173 | function test_bar_rtl() { | ||
59 | 174 | verify(slider.bar); | ||
60 | 175 | slider.minimumValue = 0.0; | ||
61 | 176 | slider.maximumValue = 1.0; | ||
62 | 177 | slider.value = 0.3; | ||
63 | 178 | |||
64 | 179 | // check for LTR | ||
65 | 180 | print("Slider width:", slider.bar.width) | ||
66 | 181 | verify(slider.value >= slider.bar.width) | ||
67 | 182 | |||
68 | 183 | // check for RTL | ||
69 | 184 | slider.enableRTL = true; | ||
70 | 185 | print("Slider RTL width:", slider.bar.width) | ||
71 | 186 | verify(slider.value >= slider.bar.width) | ||
72 | 187 | } | ||
73 | 163 | } | 188 | } |
74 | 164 | } | 189 | } |
FAILED: Continuous integration, rev:2143 /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-armhf- stable/ 1548/ /jenkins. ubuntu. com/ubuntu- sdk/job/ generic- update- mp/7124/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-armhf- stable/ 1548/rebuild
https:/