Merge lp:~mzanetti/ubuntu-system-settings/only-animate-when-visible into lp:ubuntu-system-settings

Proposed by Michael Zanetti
Status: Merged
Approved by: Ken VanDine
Approved revision: 1550
Merged at revision: 1560
Proposed branch: lp:~mzanetti/ubuntu-system-settings/only-animate-when-visible
Merge into: lp:ubuntu-system-settings
Diff against target: 29 lines (+3/-3)
1 file modified
plugins/bluetooth/PageComponent.qml (+3/-3)
To merge this branch: bzr merge lp:~mzanetti/ubuntu-system-settings/only-animate-when-visible
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ken VanDine Approve
Review via email: mp+276754@code.launchpad.net

Commit message

Only animate ActivityIndicators when they are visible

Description of the change

This reduces CPU usage when in the Bluetooth page a lot.

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks great

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/bluetooth/PageComponent.qml'
2--- plugins/bluetooth/PageComponent.qml 2015-09-18 14:18:11 +0000
3+++ plugins/bluetooth/PageComponent.qml 2015-11-05 12:58:46 +0000
4@@ -205,7 +205,7 @@
5 topMargin: units.gu(1)
6 }
7 visible: backend.powered && !backend.discoverable
8- running: true
9+ running: visible
10 }
11 }
12 }
13@@ -237,7 +237,7 @@
14 text: getDisplayName(type, displayName)
15 control: ActivityIndicator {
16 visible: connection == Device.Connecting
17- running: true
18+ running: visible
19 }
20 onClicked: {
21 backend.setSelectedDevice(addressName);
22@@ -256,7 +256,7 @@
23 enabled: bluetoothActionGroup.enabled
24 control: ActivityIndicator {
25 visible: backend.powered && backend.discovering
26- running: true
27+ running: visible
28 }
29 }
30

Subscribers

People subscribed via source and target branches