~ubuntu-branches/ubuntu/saucy/unity8/saucy-proposed

« back to all changes in this revision

Viewing changes to Greeter/Gradient.js

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Michał Sawicz, Nick Dedekind, Albert Astals, Christopher Lee, Ubuntu daily release
  • Date: 2013-10-05 11:45:14 UTC
  • mfrom: (1.1.42)
  • Revision ID: package-import@ubuntu.com-20131005114514-fhwzgl2362zv4fmd
Tags: 7.82+13.10.20131005-0ubuntu1
[ Michał Sawicz ]
* Revert r376 that caused constant CPU usage due to the
  ActivityIndicator.

[ Nick Dedekind ]
* Removed indicators-client autopilot tests. (LP: #1234736)

[ Albert Astals ]
* Revert r388. (LP: #1235268)

[ Christopher Lee ]
* Removes passing -fullscreen to unity8 when on the device (as per bug
  #1235065). (LP: #1235065)

[ Ubuntu daily release ]
* Automatic snapshot from revision 396

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 */
16
16
 
17
17
function threeColorByIndex(index, total, colors) {
18
 
    var red, green, blue
19
 
    var p = index / total
 
18
    var red, green, blue;
 
19
    var p = 0.0;
 
20
 
 
21
    if(total > 0) {
 
22
        p = index / total;
 
23
    }
20
24
 
21
25
    if (p < 0.5) {
22
26
        red = (colors.main.r * p * 2.0) + colors.start.r * (0.5 - p) * 2.0;
28
32
        blue = colors.end.b * (p - 0.5) * 2.0 + colors.main.b * (1.0 - p) * 2.0;
29
33
    }
30
34
 
31
 
    return Qt.rgba(red, green, blue, 1)
 
35
    return Qt.rgba(red, green, blue, 1);
32
36
}