From 267ddccbff09b8282de150134f35c191574454dd Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Sun, 14 Dec 2014 16:22:38 -0800 Subject: [PATCH] save some CPU cycle when busy indicator is not visible. Change-Id: Ia5c296cdbc6c0ccd2ca45444d4f3171723b50d23 --- src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml b/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml index 49021de8b..44abe4ba4 100644 --- a/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml +++ b/src/declarativeimports/plasmastyle/BusyIndicatorStyle.qml @@ -24,6 +24,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore BusyIndicatorStyle { indicator: PlasmaCore.SvgItem { + id: indicatorItem svg: PlasmaCore.Svg { imagePath: "widgets/busywidget" } elementId: "busywidget" @@ -45,7 +46,7 @@ BusyIndicatorStyle { from: 0 to: 360 duration: 1500 - running: control.running + running: control.running && indicatorItem.visible && indicatorItem.opacity > 0; loops: Animation.Infinite } }