save some CPU cycle when busy indicator is not visible.

Change-Id: Ia5c296cdbc6c0ccd2ca45444d4f3171723b50d23
This commit is contained in:
Weng Xuetian 2014-12-14 16:22:38 -08:00
parent f64207f408
commit 267ddccbff

View File

@ -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
}
}