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

Commit 600ff62

Browse files
committed
buttons don't use static colors for the icons anymore
1 parent 17b8cc6 commit 600ff62

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

kdecoration/breezewaybutton.cpp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,25 @@ namespace Breezeway
378378

379379
return d->titleBarColor();
380380

381-
} else if( d->internalSettings()->alwaysShowButtonIcons() ){
382-
383-
return QColor(colorSymbol);
381+
} else if( d->internalSettings()->alwaysShowButtonIcons() || isHovered() ){
382+
auto c = d->client().data();
383+
if ( c->isActive() ){
384+
QColor color;
385+
if( type() == DecorationButtonType::Close ) {
386+
color.setRgb(colorClose);
387+
} else if( type() == DecorationButtonType::Maximize ) {
388+
color.setRgb(colorMaximize);
389+
} else if( type() == DecorationButtonType::Minimize ) {
390+
color.setRgb(colorMinimize);
391+
} else {
392+
color.setRgb(colorOther);
393+
}
394+
return color.lighter(40);
395+
} else {
396+
QColor color;
397+
color = d->titleBarColor();
398+
return color.lighter(60);
399+
}
384400

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

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

406-
} else if( isHovered() ) {
422+
}
423+
// else if( isHovered() ) {
407424

408-
return QColor(colorSymbol);
425+
// return QColor(colorSymbol);
409426

410-
} else {
427+
// }
428+
else {
411429

412430
return backgroundColor();
413431

0 commit comments

Comments
 (0)