fixed detection of pressed state for decoration's 'toggle like' buttons.
This commit is contained in:
parent
15ea44e709
commit
5194705e30
1 changed files with 7 additions and 3 deletions
|
@ -223,10 +223,14 @@ namespace Oxygen
|
|||
// draw shadow
|
||||
painter.drawPixmap( 0, 0, _helper.windecoButtonGlow( shadow, scale ) );
|
||||
|
||||
// draw button shape
|
||||
const bool pressed( (_status == Oxygen::Pressed) ||
|
||||
( isChecked() && isToggleButton() ) );
|
||||
// decide on pressed state
|
||||
const bool pressed(
|
||||
(_status == Oxygen::Pressed) ||
|
||||
( _type == ButtonSticky && _client.isOnAllDesktops() ) ||
|
||||
( _type == ButtonAbove && _client.keepAbove() ) ||
|
||||
( _type == ButtonBelow && _client.keepBelow() ) );
|
||||
|
||||
// draw button shape
|
||||
painter.drawPixmap(0, 0, _helper.windecoButton( base, pressed, scale ) );
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue