diff --git a/CMakeLists.txt b/CMakeLists.txt index cc874dc2e..f214cdd8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,7 @@ set(plasma_LIB_SRCS animations/slide.cpp animations/pulser.cpp animations/rotation.cpp + animations/pause.cpp applet.cpp configloader.cpp containment.cpp @@ -358,6 +359,7 @@ install(FILES animations/slide.h animations/pulser.h animations/rotation.h + animations/pause.h DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/animations COMPONENT Devel) diff --git a/animations/fade.cpp b/animations/fade.cpp index d1662737d..371934dd5 100644 --- a/animations/fade.cpp +++ b/animations/fade.cpp @@ -42,6 +42,11 @@ void FadeAnimation::setFactor(qreal factor) m_animFactor = qBound(qreal(0.0), factor, qreal(1.0)); } +qreal FadeAnimation::factor() const +{ + return m_animFactor; +} + void FadeAnimation::setWidgetToAnimate(QGraphicsWidget *widget) { QGraphicsOpacityEffect *effect = m_opacityEffect.data(); diff --git a/private/focusindicator.cpp b/private/focusindicator.cpp index ac7633534..b1a803242 100644 --- a/private/focusindicator.cpp +++ b/private/focusindicator.cpp @@ -39,9 +39,11 @@ FocusIndicator::FocusIndicator(QGraphicsWidget *parent) m_background->setElementPrefix("hover"); m_background->setCacheAllRenderedFrames(true); - m_fadeIn = new FadeAnimation(1.0); + m_fadeIn = new FadeAnimation(); + m_fadeIn->setFactor(1.0); m_fadeIn->setWidgetToAnimate(this); - m_fadeOut = new FadeAnimation(0.0); + m_fadeOut = new FadeAnimation(); + m_fadeOut->setFactor(0); m_fadeOut->setWidgetToAnimate(this); setOpacity(0);