Merge lp:~seb128/ubuntu-system-settings/battery-focus-refresh into lp:ubuntu-system-settings

Proposed by Sebastien Bacher on 2015-03-23
Status: Merged
Approved by: Ken VanDine on 2015-03-31
Approved revision: 1358
Merged at revision: 1383
Proposed branch: lp:~seb128/ubuntu-system-settings/battery-focus-refresh
Merge into: lp:ubuntu-system-settings
Diff against target: 19 lines (+9/-0)
1 file modified
plugins/battery/PageComponent.qml (+9/-0)
To merge this branch: bzr merge lp:~seb128/ubuntu-system-settings/battery-focus-refresh
Reviewer Review Type Date Requested Status
Ken VanDine 2015-03-23 Approve on 2015-03-31
PS Jenkins bot continuous-integration Approve on 2015-03-30
Review via email: mp+253854@code.launchpad.net

Commit Message

[battery] refresh the canvas when getting focus to avoid outdated info

Description of the Change

[battery] refresh the canvas when getting focus to avoid outdated info

To post a comment you must log in.
Ken VanDine (ken-vandine) wrote :

Looks good!

review: Approve

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-01-30 18:09:06 +0000
3+++ plugins/battery/PageComponent.qml 2015-03-23 16:57:03 +0000
4@@ -83,6 +83,15 @@
5 onTriggered: canvas.requestPaint()
6 }
7
8+ Connections {
9+ target: Qt.application
10+ onActiveChanged: {
11+ if (Qt.application.state === Qt.ApplicationActive) {
12+ canvas.requestPaint()
13+ }
14+ }
15+ }
16+
17 Flickable {
18 id: scrollWidget
19 anchors.fill: parent

Subscribers

People subscribed via source and target branches