properly update parent when button state is changed.
This commit is contained in:
parent
01da5bb015
commit
b8a767e3cf
2 changed files with 6 additions and 16 deletions
|
@ -122,7 +122,7 @@ namespace Oxygen
|
||||||
_glowAnimation->setDirection( Animation::Forward );
|
_glowAnimation->setDirection( Animation::Forward );
|
||||||
if( !isAnimated() ) _glowAnimation->start();
|
if( !isAnimated() ) _glowAnimation->start();
|
||||||
|
|
||||||
} else update();
|
} else parentUpdate();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ namespace Oxygen
|
||||||
}
|
}
|
||||||
|
|
||||||
_status = Oxygen::Normal;
|
_status = Oxygen::Normal;
|
||||||
update();
|
parentUpdate();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ namespace Oxygen
|
||||||
if( _type == ButtonMax || event->button() == Qt::LeftButton )
|
if( _type == ButtonMax || event->button() == Qt::LeftButton )
|
||||||
{
|
{
|
||||||
_status = Oxygen::Pressed;
|
_status = Oxygen::Pressed;
|
||||||
update();
|
parentUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
KCommonDecorationButton::mousePressEvent( event );
|
KCommonDecorationButton::mousePressEvent( event );
|
||||||
|
@ -161,7 +161,7 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
|
|
||||||
_status = ( rect().contains( event->pos() ) ) ? Oxygen::Hovered:Oxygen::Normal;
|
_status = ( rect().contains( event->pos() ) ) ? Oxygen::Hovered:Oxygen::Normal;
|
||||||
update();
|
parentUpdate();
|
||||||
|
|
||||||
KCommonDecorationButton::mouseReleaseEvent( event );
|
KCommonDecorationButton::mouseReleaseEvent( event );
|
||||||
}
|
}
|
||||||
|
@ -184,17 +184,8 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
|
|
||||||
if( _client.hideTitleBar() ) return;
|
if( _client.hideTitleBar() ) return;
|
||||||
|
if( !_client.compositingActive() )
|
||||||
if( _client.compositingActive() )
|
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
|
|
||||||
QPainter painter( this );
|
|
||||||
painter.setRenderHints(QPainter::Antialiasing);
|
|
||||||
painter.setClipRegion( event->region() );
|
|
||||||
paint( painter );
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -260,7 +251,6 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
|
|
||||||
// shadow color
|
// shadow color
|
||||||
QColor shadow;
|
|
||||||
if( isAnimated() ) shadow = _helper.alphaColor( glow, glowIntensity() );
|
if( isAnimated() ) shadow = _helper.alphaColor( glow, glowIntensity() );
|
||||||
else if( _status == Oxygen::Hovered ) shadow = glow;
|
else if( _status == Oxygen::Hovered ) shadow = glow;
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
if( _glowIntensity == value ) return;
|
if( _glowIntensity == value ) return;
|
||||||
_glowIntensity = value;
|
_glowIntensity = value;
|
||||||
update();
|
parentUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal glowIntensity( void ) const
|
qreal glowIntensity( void ) const
|
||||||
|
|
Loading…
Reference in a new issue