Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit

Permalink
buttons don't use static colors for the icons anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
n4n0GH committed Nov 10, 2019
1 parent 17b8cc6 commit 600ff62
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions kdecoration/breezewaybutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,25 @@ namespace Breezeway

return d->titleBarColor();

} else if( d->internalSettings()->alwaysShowButtonIcons() ){

return QColor(colorSymbol);
} else if( d->internalSettings()->alwaysShowButtonIcons() || isHovered() ){
auto c = d->client().data();
if ( c->isActive() ){
QColor color;
if( type() == DecorationButtonType::Close ) {
color.setRgb(colorClose);
} else if( type() == DecorationButtonType::Maximize ) {
color.setRgb(colorMaximize);
} else if( type() == DecorationButtonType::Minimize ) {
color.setRgb(colorMinimize);
} else {
color.setRgb(colorOther);
}
return color.lighter(40);
} else {
QColor color;
color = d->titleBarColor();
return color.lighter(60);
}

} else if( m_animation->state() == QPropertyAnimation::Running ) {

Expand All @@ -403,11 +419,13 @@ namespace Breezeway
}
return KColorUtils::mix( color, QColor(colorSymbol), m_opacity );

} else if( isHovered() ) {
}
// else if( isHovered() ) {

return QColor(colorSymbol);
// return QColor(colorSymbol);

} else {
// }
else {

return backgroundColor();

Expand Down

0 comments on commit 600ff62

Please sign in to comment.