Merge lp:~fboucault/ubuntu-ui-toolkit/rtl_support into lp:ubuntu-ui-toolkit
- rtl_support
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Zsombor Egri |
Approved revision: | 908 |
Merged at revision: | 920 |
Proposed branch: | lp:~fboucault/ubuntu-ui-toolkit/rtl_support |
Merge into: | lp:ubuntu-ui-toolkit |
Prerequisite: | lp:~fboucault/ubuntu-ui-toolkit/gallery_cleaner_responsiveness |
Diff against target: |
334 lines (+79/-7) 19 files modified
examples/ubuntu-ui-toolkit-gallery/TemplateFlow.qml (+1/-0) examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml (+12/-0) examples/ubuntu-ui-toolkit-gallery/TemplateSection.qml (+1/-0) examples/ubuntu-ui-toolkit-gallery/TemplateSectionNavigation.qml (+3/-0) examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml (+3/-0) modules/Ubuntu/Components/Label.qml (+12/-0) modules/Ubuntu/Components/ListItems/Empty.qml (+5/-0) modules/Ubuntu/Components/Popups/PopupBase.qml (+3/-0) modules/Ubuntu/Components/Slider.qml (+15/-4) modules/Ubuntu/Components/TextArea.qml (+3/-0) modules/Ubuntu/Components/TextField.qml (+3/-0) modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml (+3/-0) modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml (+2/-0) modules/Ubuntu/Components/Themes/Ambiance/PartialColorize.qml (+4/-2) modules/Ubuntu/Components/Themes/Ambiance/PartialColorizeUbuntuShape.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml (+2/-0) modules/Ubuntu/Components/Themes/Ambiance/ProgressionVisualStyle.qml (+1/-0) modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml (+2/-0) modules/Ubuntu/Components/Toolbar.qml (+3/-0) |
To merge this branch: | bzr merge lp:~fboucault/ubuntu-ui-toolkit/rtl_support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Zsombor Egri | Approve | ||
Review via email:
|
Commit message
Added Right-to-Left languages support to most widgets and to the UI Toolkit Gallery.
The following widgets now behave properly in RTL environments:
- List Items
- Popups
- Slider
- TextArea
- TextField
- Button
- ProgressBar
- Toolbar
- Header
- Switch
Tabs still need to be reversed.
Relayout issues had to be workarounded (QTBUG 35095) for Label and Row.
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Florian Boucault (fboucault) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:904
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:904
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Zsombor Egri (zsombi) wrote : | # |
> Looks good to me.
However I just saw that an extra API has been added to Text... You need to add that to components.api.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Zsombor Egri (zsombi) wrote : | # |
> > Looks good to me.
>
> However I just saw that an extra API has been added to Text... You need to add
> that to components.api.
... or actually make it private/internal so it does not break components.api.
- 905. By Florian Boucault
-
Merged trunk
- 906. By Florian Boucault
-
Merged from trunk
- 907. By Florian Boucault
-
Removed newly introduced public method from Label.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:907
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 908. By Florian Boucault
-
Label: marked onWidthChanged internal as to suppress documentation errors.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:908
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Zsombor Egri (zsombi) wrote : | # |
Can go in, hope to get CI also rolling.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'examples/ubuntu-ui-toolkit-gallery/TemplateFlow.qml' | |||
2 | --- examples/ubuntu-ui-toolkit-gallery/TemplateFlow.qml 2013-04-24 17:09:29 +0000 | |||
3 | +++ examples/ubuntu-ui-toolkit-gallery/TemplateFlow.qml 2014-01-23 19:11:13 +0000 | |||
4 | @@ -32,6 +32,7 @@ | |||
5 | 32 | Label { | 32 | Label { |
6 | 33 | id: label | 33 | id: label |
7 | 34 | text: templateFlow.title | 34 | text: templateFlow.title |
8 | 35 | anchors.left: parent.left | ||
9 | 35 | width: templateFlow.titleWidth | 36 | width: templateFlow.titleWidth |
10 | 36 | y: templateFlow.titleOffset | 37 | y: templateFlow.titleOffset |
11 | 37 | elide: Text.ElideRight | 38 | elide: Text.ElideRight |
12 | 38 | 39 | ||
13 | === modified file 'examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml' | |||
14 | --- examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml 2013-04-24 17:09:29 +0000 | |||
15 | +++ examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml 2014-01-23 19:11:13 +0000 | |||
16 | @@ -32,6 +32,7 @@ | |||
17 | 32 | id: label | 32 | id: label |
18 | 33 | text: templateRow.title | 33 | text: templateRow.title |
19 | 34 | width: templateRow.titleWidth | 34 | width: templateRow.titleWidth |
20 | 35 | anchors.left: parent.left | ||
21 | 35 | anchors.verticalCenter: contentRow.verticalCenter | 36 | anchors.verticalCenter: contentRow.verticalCenter |
22 | 36 | elide: Text.ElideRight | 37 | elide: Text.ElideRight |
23 | 37 | font.weight: Font.Light | 38 | font.weight: Font.Light |
24 | @@ -44,5 +45,16 @@ | |||
25 | 44 | anchors.leftMargin: units.gu(2) | 45 | anchors.leftMargin: units.gu(2) |
26 | 45 | anchors.right: parent.right | 46 | anchors.right: parent.right |
27 | 46 | spacing: units.gu(2) | 47 | spacing: units.gu(2) |
28 | 48 | |||
29 | 49 | /* FIXME: workaround for QTBUG 35095 where Row's content is not relaidout | ||
30 | 50 | when the width changes and LayoutMirroring is enabled. | ||
31 | 51 | |||
32 | 52 | Ref.: https://bugreports.qt-project.org/browse/QTBUG-35095 | ||
33 | 53 | */ | ||
34 | 54 | onWidthChanged: if (LayoutMirroring.enabled) forceRelayout() | ||
35 | 55 | |||
36 | 56 | function forceRelayout() { | ||
37 | 57 | spacing = spacing + 0.00001; | ||
38 | 58 | } | ||
39 | 47 | } | 59 | } |
40 | 48 | } | 60 | } |
41 | 49 | 61 | ||
42 | === modified file 'examples/ubuntu-ui-toolkit-gallery/TemplateSection.qml' | |||
43 | --- examples/ubuntu-ui-toolkit-gallery/TemplateSection.qml 2013-04-24 17:09:29 +0000 | |||
44 | +++ examples/ubuntu-ui-toolkit-gallery/TemplateSection.qml 2014-01-23 19:11:13 +0000 | |||
45 | @@ -34,6 +34,7 @@ | |||
46 | 34 | id: label | 34 | id: label |
47 | 35 | text: templateSection.title | 35 | text: templateSection.title |
48 | 36 | fontSize: "large" | 36 | fontSize: "large" |
49 | 37 | anchors.left: parent.left | ||
50 | 37 | } | 38 | } |
51 | 38 | 39 | ||
52 | 39 | WebLink { | 40 | WebLink { |
53 | 40 | 41 | ||
54 | === modified file 'examples/ubuntu-ui-toolkit-gallery/TemplateSectionNavigation.qml' | |||
55 | --- examples/ubuntu-ui-toolkit-gallery/TemplateSectionNavigation.qml 2013-04-24 17:09:29 +0000 | |||
56 | +++ examples/ubuntu-ui-toolkit-gallery/TemplateSectionNavigation.qml 2014-01-23 19:11:13 +0000 | |||
57 | @@ -33,6 +33,7 @@ | |||
58 | 33 | id: label | 33 | id: label |
59 | 34 | text: templateSection.title | 34 | text: templateSection.title |
60 | 35 | fontSize: "large" | 35 | fontSize: "large" |
61 | 36 | anchors.left: parent.left | ||
62 | 36 | } | 37 | } |
63 | 37 | 38 | ||
64 | 38 | WebLink { | 39 | WebLink { |
65 | @@ -43,6 +44,7 @@ | |||
66 | 43 | visible: documentation != "" | 44 | visible: documentation != "" |
67 | 44 | fontSize: "small" | 45 | fontSize: "small" |
68 | 45 | opacity: 0.3 | 46 | opacity: 0.3 |
69 | 47 | anchors.left: parent.left | ||
70 | 46 | } | 48 | } |
71 | 47 | 49 | ||
72 | 48 | WebLink { | 50 | WebLink { |
73 | @@ -50,6 +52,7 @@ | |||
74 | 50 | url: templateSection.designUrl | 52 | url: templateSection.designUrl |
75 | 51 | fontSize: "small" | 53 | fontSize: "small" |
76 | 52 | opacity: 0.3 | 54 | opacity: 0.3 |
77 | 55 | anchors.left: parent.left | ||
78 | 53 | } | 56 | } |
79 | 54 | 57 | ||
80 | 55 | Image { | 58 | Image { |
81 | 56 | 59 | ||
82 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml' | |||
83 | --- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2014-01-07 19:40:29 +0000 | |||
84 | +++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2014-01-23 19:11:13 +0000 | |||
85 | @@ -36,6 +36,9 @@ | |||
86 | 36 | */ | 36 | */ |
87 | 37 | automaticOrientation: true | 37 | automaticOrientation: true |
88 | 38 | 38 | ||
89 | 39 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
90 | 40 | LayoutMirroring.childrenInherit: true | ||
91 | 41 | |||
92 | 39 | state: width >= units.gu(80) ? "wide" : "narrow" | 42 | state: width >= units.gu(80) ? "wide" : "narrow" |
93 | 40 | states: [ | 43 | states: [ |
94 | 41 | State { | 44 | State { |
95 | 42 | 45 | ||
96 | === modified file 'modules/Ubuntu/Components/Label.qml' | |||
97 | --- modules/Ubuntu/Components/Label.qml 2013-07-04 21:36:23 +0000 | |||
98 | +++ modules/Ubuntu/Components/Label.qml 2014-01-23 19:11:13 +0000 | |||
99 | @@ -57,4 +57,16 @@ | |||
100 | 57 | font.pixelSize: FontUtils.sizeToPixels(fontSize) | 57 | font.pixelSize: FontUtils.sizeToPixels(fontSize) |
101 | 58 | font.family: "Ubuntu" | 58 | font.family: "Ubuntu" |
102 | 59 | color: Theme.palette.selected.backgroundText | 59 | color: Theme.palette.selected.backgroundText |
103 | 60 | |||
104 | 61 | /* FIXME: workaround for QTBUG 35095 where Text's alignment is incorrect | ||
105 | 62 | when the width changes and LayoutMirroring is enabled. | ||
106 | 63 | |||
107 | 64 | Ref.: https://bugreports.qt-project.org/browse/QTBUG-35095 | ||
108 | 65 | */ | ||
109 | 66 | /*! \internal */ | ||
110 | 67 | onWidthChanged: if (LayoutMirroring.enabled) { | ||
111 | 68 | // force a relayout | ||
112 | 69 | lineHeight += 0.00001; | ||
113 | 70 | lineHeight -= 0.00001; | ||
114 | 71 | } | ||
115 | 60 | } | 72 | } |
116 | 61 | 73 | ||
117 | === modified file 'modules/Ubuntu/Components/ListItems/Empty.qml' | |||
118 | --- modules/Ubuntu/Components/ListItems/Empty.qml 2013-12-23 14:01:58 +0000 | |||
119 | +++ modules/Ubuntu/Components/ListItems/Empty.qml 2014-01-23 19:11:13 +0000 | |||
120 | @@ -184,6 +184,9 @@ | |||
121 | 184 | // Keep compatible with the old version | 184 | // Keep compatible with the old version |
122 | 185 | height: implicitHeight | 185 | height: implicitHeight |
123 | 186 | 186 | ||
124 | 187 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
125 | 188 | LayoutMirroring.childrenInherit: true | ||
126 | 189 | |||
127 | 187 | /*! \internal */ | 190 | /*! \internal */ |
128 | 188 | QtObject { | 191 | QtObject { |
129 | 189 | id: priv | 192 | id: priv |
130 | @@ -347,6 +350,8 @@ | |||
131 | 347 | top: parent.top | 350 | top: parent.top |
132 | 348 | bottom: parent.bottom | 351 | bottom: parent.bottom |
133 | 349 | } | 352 | } |
134 | 353 | LayoutMirroring.enabled: false | ||
135 | 354 | LayoutMirroring.childrenInherit: true | ||
136 | 350 | 355 | ||
137 | 351 | Item { | 356 | Item { |
138 | 352 | id: confirmRemovalDialog | 357 | id: confirmRemovalDialog |
139 | 353 | 358 | ||
140 | === modified file 'modules/Ubuntu/Components/Popups/PopupBase.qml' | |||
141 | --- modules/Ubuntu/Components/Popups/PopupBase.qml 2013-06-26 19:25:09 +0000 | |||
142 | +++ modules/Ubuntu/Components/Popups/PopupBase.qml 2014-01-23 19:11:13 +0000 | |||
143 | @@ -56,6 +56,9 @@ | |||
144 | 56 | automaticOrientation: stateWrapper.rootItem && stateWrapper.rootItem.automaticOrientation ? | 56 | automaticOrientation: stateWrapper.rootItem && stateWrapper.rootItem.automaticOrientation ? |
145 | 57 | stateWrapper.rootItem.automaticOrientation : false | 57 | stateWrapper.rootItem.automaticOrientation : false |
146 | 58 | 58 | ||
147 | 59 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
148 | 60 | LayoutMirroring.childrenInherit: true | ||
149 | 61 | |||
150 | 59 | /*! | 62 | /*! |
151 | 60 | \preliminary | 63 | \preliminary |
152 | 61 | Make the popup visible. Reparent to the background area object first if needed. | 64 | Make the popup visible. Reparent to the background area object first if needed. |
153 | 62 | 65 | ||
154 | === modified file 'modules/Ubuntu/Components/Slider.qml' | |||
155 | --- modules/Ubuntu/Components/Slider.qml 2013-08-07 13:42:54 +0000 | |||
156 | +++ modules/Ubuntu/Components/Slider.qml 2014-01-23 19:11:13 +0000 | |||
157 | @@ -141,13 +141,24 @@ | |||
158 | 141 | property real dragInitNormalizedValue: 0.0 | 141 | property real dragInitNormalizedValue: 0.0 |
159 | 142 | 142 | ||
160 | 143 | function normalizedValueFromValue(value) { | 143 | function normalizedValueFromValue(value) { |
163 | 144 | return MathUtils.clampAndProject(value, slider.minimumValue, | 144 | if (Qt.application.layoutDirection == Qt.RightToLeft) { |
164 | 145 | slider.maximumValue, 0.0, 1.0); | 145 | return MathUtils.clampAndProject(value, slider.minimumValue, |
165 | 146 | slider.maximumValue, 1.0, 0.0); | ||
166 | 147 | } else { | ||
167 | 148 | return MathUtils.clampAndProject(value, slider.minimumValue, | ||
168 | 149 | slider.maximumValue, 0.0, 1.0); | ||
169 | 150 | } | ||
170 | 151 | |||
171 | 146 | } | 152 | } |
172 | 147 | 153 | ||
173 | 148 | function valueFromNormalizedValue(normalizedValue) { | 154 | function valueFromNormalizedValue(normalizedValue) { |
176 | 149 | return MathUtils.lerp(MathUtils.clamp(normalizedValue, 0.0, 1.0), | 155 | if (Qt.application.layoutDirection == Qt.RightToLeft) { |
177 | 150 | slider.minimumValue, slider.maximumValue); | 156 | return MathUtils.lerp(MathUtils.clamp(normalizedValue, 0.0, 1.0), |
178 | 157 | slider.maximumValue, slider.minimumValue); | ||
179 | 158 | } else { | ||
180 | 159 | return MathUtils.lerp(MathUtils.clamp(normalizedValue, 0.0, 1.0), | ||
181 | 160 | slider.minimumValue, slider.maximumValue); | ||
182 | 161 | } | ||
183 | 151 | } | 162 | } |
184 | 152 | 163 | ||
185 | 153 | /* Mimic the behaviour of the 'pressed' property with one important difference: | 164 | /* Mimic the behaviour of the 'pressed' property with one important difference: |
186 | 154 | 165 | ||
187 | === modified file 'modules/Ubuntu/Components/TextArea.qml' | |||
188 | --- modules/Ubuntu/Components/TextArea.qml 2013-11-06 22:17:05 +0000 | |||
189 | +++ modules/Ubuntu/Components/TextArea.qml 2014-01-23 19:11:13 +0000 | |||
190 | @@ -741,6 +741,9 @@ | |||
191 | 741 | /*!\internal */ | 741 | /*!\internal */ |
192 | 742 | onHeightChanged: internal.inputAreaHeight = control.height - 2 * internal.frameSpacing | 742 | onHeightChanged: internal.inputAreaHeight = control.height - 2 * internal.frameSpacing |
193 | 743 | 743 | ||
194 | 744 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
195 | 745 | LayoutMirroring.childrenInherit: true | ||
196 | 746 | |||
197 | 744 | /*!\internal */ | 747 | /*!\internal */ |
198 | 745 | property alias __internal: internal | 748 | property alias __internal: internal |
199 | 746 | QtObject { | 749 | QtObject { |
200 | 747 | 750 | ||
201 | === modified file 'modules/Ubuntu/Components/TextField.qml' | |||
202 | --- modules/Ubuntu/Components/TextField.qml 2014-01-13 15:23:25 +0000 | |||
203 | +++ modules/Ubuntu/Components/TextField.qml 2014-01-23 19:11:13 +0000 | |||
204 | @@ -809,6 +809,9 @@ | |||
205 | 809 | control.focus = false; | 809 | control.focus = false; |
206 | 810 | } | 810 | } |
207 | 811 | 811 | ||
208 | 812 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
209 | 813 | LayoutMirroring.childrenInherit: true | ||
210 | 814 | |||
211 | 812 | // grab clicks from the area between the frame and the input | 815 | // grab clicks from the area between the frame and the input |
212 | 813 | MouseArea { | 816 | MouseArea { |
213 | 814 | anchors.fill: parent | 817 | anchors.fill: parent |
214 | 815 | 818 | ||
215 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml' | |||
216 | --- modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml 2013-07-05 12:33:02 +0000 | |||
217 | +++ modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml 2014-01-23 19:11:13 +0000 | |||
218 | @@ -33,6 +33,9 @@ | |||
219 | 33 | implicitWidth: Math.max(minimumWidth, foreground.implicitWidth + 2*horizontalPadding) | 33 | implicitWidth: Math.max(minimumWidth, foreground.implicitWidth + 2*horizontalPadding) |
220 | 34 | implicitHeight: units.gu(5) | 34 | implicitHeight: units.gu(5) |
221 | 35 | 35 | ||
222 | 36 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
223 | 37 | LayoutMirroring.childrenInherit: true | ||
224 | 38 | |||
225 | 36 | /* The proxy is necessary because Gradient.stops and GradientStop.color are | 39 | /* The proxy is necessary because Gradient.stops and GradientStop.color are |
226 | 37 | non-NOTIFYable properties. They cannot be written to so it is fine but | 40 | non-NOTIFYable properties. They cannot be written to so it is fine but |
227 | 38 | the proxy avoids the warnings. | 41 | the proxy avoids the warnings. |
228 | 39 | 42 | ||
229 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml' | |||
230 | --- modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml 2013-11-12 06:41:24 +0000 | |||
231 | +++ modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml 2014-01-23 19:11:13 +0000 | |||
232 | @@ -72,6 +72,8 @@ | |||
233 | 72 | height: headerStyle.contentHeight | 72 | height: headerStyle.contentHeight |
234 | 73 | 73 | ||
235 | 74 | Label { | 74 | Label { |
236 | 75 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
237 | 76 | |||
238 | 75 | anchors { | 77 | anchors { |
239 | 76 | left: parent.left | 78 | left: parent.left |
240 | 77 | verticalCenter: parent.verticalCenter | 79 | verticalCenter: parent.verticalCenter |
241 | 78 | 80 | ||
242 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/PartialColorize.qml' | |||
243 | --- modules/Ubuntu/Components/Themes/Ambiance/PartialColorize.qml 2013-08-01 14:05:39 +0000 | |||
244 | +++ modules/Ubuntu/Components/Themes/Ambiance/PartialColorize.qml 2014-01-23 19:11:13 +0000 | |||
245 | @@ -32,7 +32,9 @@ | |||
246 | 32 | property color leftColor | 32 | property color leftColor |
247 | 33 | property color rightColor | 33 | property color rightColor |
248 | 34 | property real progress | 34 | property real progress |
250 | 35 | 35 | property bool mirror: false | |
251 | 36 | property string texCoord: mirror ? "1.0 - qt_TexCoord0.x" : "qt_TexCoord0.x" | ||
252 | 37 | |||
253 | 36 | fragmentShader: " | 38 | fragmentShader: " |
254 | 37 | varying highp vec2 qt_TexCoord0; | 39 | varying highp vec2 qt_TexCoord0; |
255 | 38 | uniform sampler2D source; | 40 | uniform sampler2D source; |
256 | @@ -43,7 +45,7 @@ | |||
257 | 43 | 45 | ||
258 | 44 | void main() { | 46 | void main() { |
259 | 45 | lowp vec4 sourceColor = texture2D(source, qt_TexCoord0); | 47 | lowp vec4 sourceColor = texture2D(source, qt_TexCoord0); |
261 | 46 | lowp vec4 newColor = mix(leftColor, rightColor, step(progress, qt_TexCoord0.x)); | 48 | lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + ")); |
262 | 47 | gl_FragColor = newColor * sourceColor.a * qt_Opacity; | 49 | gl_FragColor = newColor * sourceColor.a * qt_Opacity; |
263 | 48 | }" | 50 | }" |
264 | 49 | } | 51 | } |
265 | 50 | 52 | ||
266 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/PartialColorizeUbuntuShape.qml' | |||
267 | --- modules/Ubuntu/Components/Themes/Ambiance/PartialColorizeUbuntuShape.qml 2013-08-02 12:13:33 +0000 | |||
268 | +++ modules/Ubuntu/Components/Themes/Ambiance/PartialColorizeUbuntuShape.qml 2014-01-23 19:11:13 +0000 | |||
269 | @@ -27,7 +27,7 @@ | |||
270 | 27 | 27 | ||
271 | 28 | void main() { | 28 | void main() { |
272 | 29 | lowp vec4 color = texture2D(source, qt_TexCoord0); | 29 | lowp vec4 color = texture2D(source, qt_TexCoord0); |
274 | 30 | lowp vec4 newColor = mix(leftColor, rightColor, step(progress, qt_TexCoord0.x)); | 30 | lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + ")); |
275 | 31 | highp float opacity = (1.0 - color.r / max(1.0/256.0, color.a)); | 31 | highp float opacity = (1.0 - color.r / max(1.0/256.0, color.a)); |
276 | 32 | lowp vec4 result = opacity * vec4(0.0, 0.0, 0.0, 1.0) + vec4(1.0 - opacity) * newColor; | 32 | lowp vec4 result = opacity * vec4(0.0, 0.0, 0.0, 1.0) + vec4(1.0 - opacity) * newColor; |
277 | 33 | gl_FragColor = vec4(result.rgb * result.a, result.a) * color.a * qt_Opacity; | 33 | gl_FragColor = vec4(result.rgb * result.a, result.a) * color.a * qt_Opacity; |
278 | 34 | 34 | ||
279 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml' | |||
280 | --- modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2013-08-07 12:26:36 +0000 | |||
281 | +++ modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-01-23 19:11:13 +0000 | |||
282 | @@ -46,6 +46,7 @@ | |||
283 | 46 | progress: progressBarStyle.progress | 46 | progress: progressBarStyle.progress |
284 | 47 | leftColor: Theme.palette.selected.foreground | 47 | leftColor: Theme.palette.selected.foreground |
285 | 48 | rightColor: Theme.palette.normal.base | 48 | rightColor: Theme.palette.normal.base |
286 | 49 | mirror: Qt.application.layoutDirection == Qt.RightToLeft | ||
287 | 49 | } | 50 | } |
288 | 50 | 51 | ||
289 | 51 | Label { | 52 | Label { |
290 | @@ -74,5 +75,6 @@ | |||
291 | 74 | leftColor: Theme.palette.selected.foregroundText | 75 | leftColor: Theme.palette.selected.foregroundText |
292 | 75 | rightColor: Theme.palette.normal.baseText | 76 | rightColor: Theme.palette.normal.baseText |
293 | 76 | progress: (progressBarStyle.progress * background.width - valueLabel.x) / valueLabel.width | 77 | progress: (progressBarStyle.progress * background.width - valueLabel.x) / valueLabel.width |
294 | 78 | mirror: Qt.application.layoutDirection == Qt.RightToLeft | ||
295 | 77 | } | 79 | } |
296 | 78 | } | 80 | } |
297 | 79 | 81 | ||
298 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ProgressionVisualStyle.qml' | |||
299 | --- modules/Ubuntu/Components/Themes/Ambiance/ProgressionVisualStyle.qml 2013-12-09 12:23:15 +0000 | |||
300 | +++ modules/Ubuntu/Components/Themes/Ambiance/ProgressionVisualStyle.qml 2014-01-23 19:11:13 +0000 | |||
301 | @@ -34,6 +34,7 @@ | |||
302 | 34 | } | 34 | } |
303 | 35 | 35 | ||
304 | 36 | opacity: enabled ? 1.0 : 0.5 | 36 | opacity: enabled ? 1.0 : 0.5 |
305 | 37 | mirror: Qt.application.layoutDirection == Qt.RightToLeft | ||
306 | 37 | } | 38 | } |
307 | 38 | 39 | ||
308 | 39 | Image { | 40 | Image { |
309 | 40 | 41 | ||
310 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml' | |||
311 | --- modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2013-09-02 09:08:52 +0000 | |||
312 | +++ modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2014-01-23 19:11:13 +0000 | |||
313 | @@ -36,6 +36,8 @@ | |||
314 | 36 | implicitWidth: units.gu(10) | 36 | implicitWidth: units.gu(10) |
315 | 37 | implicitHeight: units.gu(5) | 37 | implicitHeight: units.gu(5) |
316 | 38 | opacity: styledItem.enabled ? 1.0 : 0.5 | 38 | opacity: styledItem.enabled ? 1.0 : 0.5 |
317 | 39 | LayoutMirroring.enabled: false | ||
318 | 40 | LayoutMirroring.childrenInherit: true | ||
319 | 39 | 41 | ||
320 | 40 | UbuntuShape { | 42 | UbuntuShape { |
321 | 41 | id: background | 43 | id: background |
322 | 42 | 44 | ||
323 | === modified file 'modules/Ubuntu/Components/Toolbar.qml' | |||
324 | --- modules/Ubuntu/Components/Toolbar.qml 2013-12-02 21:25:26 +0000 | |||
325 | +++ modules/Ubuntu/Components/Toolbar.qml 2014-01-23 19:11:13 +0000 | |||
326 | @@ -33,6 +33,9 @@ | |||
327 | 33 | } | 33 | } |
328 | 34 | height: background.height | 34 | height: background.height |
329 | 35 | 35 | ||
330 | 36 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | ||
331 | 37 | LayoutMirroring.childrenInherit: true | ||
332 | 38 | |||
333 | 36 | // Closing of the toolbar on app contents ineraction is handled by the Page. | 39 | // Closing of the toolbar on app contents ineraction is handled by the Page. |
334 | 37 | __closeOnContentsClicks: false | 40 | __closeOnContentsClicks: false |
335 | 38 | 41 |
Manual testing is best done by invoking qmlscene with the -reverse switch.
English strings won't automatically reverse though. Adding the following to Label.qml does that for testing purposes:
horizontalA lignment: Text.AlignLeft