|
|
|
|
@ -47,8 +47,11 @@ namespace Breeze |
|
|
|
|
|
|
|
|
|
// connections
|
|
|
|
|
connect(decoration->client().data(), SIGNAL(iconChanged(QIcon)), this, SLOT(update())); |
|
|
|
|
connect(decoration->settings().data(), &KDecoration2::DecorationSettings::reconfigured, this, &Button::reconfigure); |
|
|
|
|
connect( this, &KDecoration2::DecorationButton::hoveredChanged, this, &Button::updateAnimationState ); |
|
|
|
|
|
|
|
|
|
reconfigure(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//__________________________________________________________________
|
|
|
|
|
@ -434,6 +437,16 @@ namespace Breeze |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//________________________________________________________________
|
|
|
|
|
void Button::reconfigure() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
// animation
|
|
|
|
|
auto d = qobject_cast<Decoration*>(decoration()); |
|
|
|
|
if( d ) m_animation->setDuration( d->internalSettings()->animationsDuration() ); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//__________________________________________________________________
|
|
|
|
|
void Button::updateAnimationState( bool hovered ) |
|
|
|
|
{ |
|
|
|
|
|