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 | overlayColor: sliderStyle.foregroundColor |
6 | overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ? |
7 | Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) : |
8 | - Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0) |
9 | + Qt.rect(thumb.x / thumb.barMinusThumbWidth, 0.0, 1 - (thumb.x / thumb.barMinusThumbWidth), 1.0) |
10 | } |
11 | |
12 | UbuntuShape { |
13 | |
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 | overlayColor: sliderStyle.foregroundColor |
19 | overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ? |
20 | Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) : |
21 | - Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0) |
22 | + Qt.rect(thumb.x / thumb.barMinusThumbWidth, 0.0, 1 - (thumb.x / thumb.barMinusThumbWidth), 1.0) |
23 | } |
24 | |
25 | UbuntuShape { |
26 | |
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 | } |
32 | } |
33 | } |
34 | + Slider { |
35 | + property bool enableRTL: false |
36 | + LayoutMirroring.enabled: enableRTL |
37 | + LayoutMirroring.childrenInherit: enableRTL |
38 | + |
39 | + id: slider |
40 | + readonly property rect bar: slider.__styleInstance && slider.__styleInstance.bar ? slider.__styleInstance.bar.overlayRect : null |
41 | + } |
42 | } |
43 | |
44 | UbuntuTestCase { |
45 | @@ -107,6 +115,7 @@ |
46 | function cleanup() { |
47 | flickSpy.target = null; |
48 | flickSpy.clear(); |
49 | + slider.enableRTL = false; |
50 | } |
51 | |
52 | function test_slider_blocks_flickable_data() { |
53 | @@ -160,5 +169,21 @@ |
54 | valueSpy.wait(); |
55 | compare(slider.value, to, "Slider has the wrong value!"); |
56 | } |
57 | + |
58 | + function test_bar_rtl() { |
59 | + verify(slider.bar); |
60 | + slider.minimumValue = 0.0; |
61 | + slider.maximumValue = 1.0; |
62 | + slider.value = 0.3; |
63 | + |
64 | + // check for LTR |
65 | + print("Slider width:", slider.bar.width) |
66 | + verify(slider.value >= slider.bar.width) |
67 | + |
68 | + // check for RTL |
69 | + slider.enableRTL = true; |
70 | + print("Slider RTL width:", slider.bar.width) |
71 | + verify(slider.value >= slider.bar.width) |
72 | + } |
73 | } |
74 | } |
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:/