Merge lp:~seb128/ubuntu-system-settings/battery-correct-init-height into lp:ubuntu-system-settings

Proposed by Sebastien Bacher on 2015-04-14
Status: Merged
Approved by: Ken VanDine on 2015-04-16
Approved revision: 1382
Merged at revision: 1419
Proposed branch: lp:~seb128/ubuntu-system-settings/battery-correct-init-height
Merge into: lp:ubuntu-system-settings
Diff against target: 12 lines (+1/-1)
1 file modified
plugins/battery/PageComponent.qml (+1/-1)
To merge this branch: bzr merge lp:~seb128/ubuntu-system-settings/battery-correct-init-height
Reviewer Review Type Date Requested Status
Ken VanDine 2015-04-14 Approve on 2015-04-16
PS Jenkins bot continuous-integration Needs Fixing on 2015-04-14
Review via email: mp+256115@code.launchpad.net

Commit Message

[battery] use the correct height value for the first point of the graph,
that fixes the initial point often starting to high and the curve starting
with an almost vertical line

Description of the Change

[battery] use the correct height value for the first point of the graph,
that fixes the initial point often starting to high and the curve starting
with an almost vertical line

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/battery/PageComponent.qml'
2--- plugins/battery/PageComponent.qml 2015-03-16 13:51:36 +0000
3+++ plugins/battery/PageComponent.qml 2015-04-14 09:26:07 +0000
4@@ -243,7 +243,7 @@
5 /* time is the offset in seconds compared to the current time (negative value)
6 we display the charge on a day, which is 86400 seconds, the value is the % */
7 ctx.moveTo((86400 - chargeDatas[0].time) / 86400 * width,
8- (chargeDatas[0].value / 100) * width)
9+ (chargeDatas[0].value / 100) * height)
10 for (var i = 1; i < chargeDatas.length; i++) {
11 ctx.lineTo((86400-chargeDatas[i].time) / 86400 * width,
12 (chargeDatas[i].value / 100) * height)

Subscribers

People subscribed via source and target branches