From 13054c04731188e373d9d13347a3574576cdc7f3 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 23 Feb 2017 12:31:10 +0000 Subject: [PATCH] Fix disabling the spinner animation when Busy indicator has no opacity Summary: Unlike the visible property, the opacity does not inherit parent values and refers to the relative opacity of that item. The current style code is checking that an item we can't control externally has an opacity > 0, this doesn't really acheive anything. This was a breakage from when we ported *to* QtQuickControls 1. Test Plan: I was running a plasmoid I had written years ago (my RSS tutorial) and had abnormally high CPU usage in an animation that I didn't have then. Code was: BusyIndicator { opacity: 0 running: true } Reviewers: #plasma, mart Reviewed By: mart Subscribers: plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D4729 --- src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml b/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml index 0da6b7794..a57408f32 100644 --- a/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml +++ b/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml @@ -49,7 +49,7 @@ BusyIndicatorStyle { from: 0 to: 360 duration: 1500 - running: control.running && indicatorItem.visible && indicatorItem.opacity > 0; + running: control.running && control.visible && control.opacity > 0; loops: Animation.Infinite } }