~zsombi/ubuntu-ui-toolkit/theme-as-singleton

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/Themes/Ambiance/PartialColorize.qml

  • Committer: Tarmac
  • Author(s): Florian Boucault
  • Date: 2014-01-24 11:56:52 UTC
  • mfrom: (901.1.7 rtl_support)
  • Revision ID: tarmac-20140124115652-nx51bfyrt68bna8e
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.
. Fixes: https://bugs.launchpad.net/bugs/1181740.

Approved by PS Jenkins bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    property color leftColor
33
33
    property color rightColor
34
34
    property real progress
35
 
    
 
35
    property bool mirror: false
 
36
    property string texCoord: mirror ? "1.0 - qt_TexCoord0.x" : "qt_TexCoord0.x"
 
37
 
36
38
    fragmentShader: "
37
39
            varying highp vec2 qt_TexCoord0;
38
40
            uniform sampler2D source;
43
45
 
44
46
            void main() {
45
47
                lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
46
 
                lowp vec4 newColor = mix(leftColor, rightColor, step(progress, qt_TexCoord0.x));
 
48
                lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));
47
49
                gl_FragColor = newColor * sourceColor.a * qt_Opacity;
48
50
            }"
49
51
}