Commit c00fd4f4 authored by No Names's avatar No Names Committed by Nate Graham
Browse files

kstyle: remove button gradients

Remove button gradients because they look outdated and the lighting model of having
a gradient that disappears on hover doesn't make sense. Also done in the QQC2 Breeze
style with qqc2-breeze-style!37.

Initial discussion at !211.
parent 18baf0eb
Pipeline #188158 passed with stage
in 2 minutes and 28 seconds
......@@ -655,19 +655,6 @@ void Helper::renderButtonFrame(QPainter *painter,
penBrush = KColorUtils::mix(color1, color2, penAnimation);
// Gradient
if (isActiveWindow && !(flat || down || hovered || checked) && enabled) {
QLinearGradient bgGradient(frameRect.topLeft(), frameRect.bottomLeft());
bgGradient.setColorAt(0, KColorUtils::mix(bgBrush.color(), Qt::white, 0.03125));
bgGradient.setColorAt(0.5, bgBrush.color());
bgGradient.setColorAt(1, KColorUtils::mix(bgBrush.color(), Qt::black, 0.03125));
QLinearGradient penGradient(frameRect.topLeft(), frameRect.bottomLeft());
penGradient.setColorAt(0, KColorUtils::mix(penBrush.color(), Qt::white, 0.03125));
penGradient.setColorAt(1, KColorUtils::mix(penBrush.color(), Qt::black, 0.0625));
bgBrush = bgGradient;
penBrush = penGradient;
// Shadow
if (isActiveWindow && !(flat || down || checked) && enabled) {
renderRoundedRectShadow(painter, shadowedRect, shadowColor(palette));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment