Commit 9d361c9e authored by Jan Blackquill's avatar Jan Blackquill 🌈
Browse files

kstyle: fix low contrast tabs on dark

This fixes the contrast of tabs on dark themes by using
a darkening factor on the Window colour, adjusted for
whether it's light or dark, instead of using the Shadow
colour for both light and dark themes.

BUG: 438627
FIXED-IN: 5.25
parent 6d3c04d7
Pipeline #141636 passed with stage
in 2 minutes and 45 seconds
......@@ -1408,7 +1408,8 @@ namespace Breeze
// don't overlap left border
frameRect.adjust(1, 0, 0, 0);
}
bgBrush = alphaColor(palette.color(QPalette::Shadow), 0.2);
const auto windowColor = palette.color(QPalette::Window);
bgBrush = windowColor.darker(windowColor.lightnessF() > 0.5 ? 120 : 160);
const auto hover = alphaColor(hoverColor(palette), 0.2);
if (animated) {
bgBrush = KColorUtils::mix(bgBrush, hover, animation);
......
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