Commit df538d14 authored by David Edmundson's avatar David Edmundson

Fix colours of header bar for acitve and inactive windows

Summary:
Use and generate correct colours from the window manager palette rather
than the window palette in the headerbar.

BUG: 403426

This works beautifully on wayland, on X11 kwin doesn't send
NET_WM_STATE_FOCUSSED and GTK doesn't correctly WMs that don't support
it.

Might be worth not committing this till then.

Test Plan: Ran gtk3-demo which requests CSDs

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19603
parent 9aa944ea
......@@ -69,10 +69,10 @@
// Titlebar color
@function t_color($c: text) {
@if $c == text {
@return $WindowForegroundNormal;
@return $WMactiveForeground;
}
@if $c == background {
@return $WindowBackgroundNormal;
@return $WMactiveBackground;
}
@if $c == background-light {
@return $WindowBackgroundNormal;
......@@ -81,7 +81,7 @@
@return $WMinactiveForeground;
}
@if $c == backdrop-background {
@return $WindowBackgroundNormal;
@return $WMinactiveBackground;
}
}
......
......@@ -13,7 +13,8 @@ headerbar {
border-style: solid;
border-color: $border_color;
color: t_color(text);
background-image: linear-gradient(to bottom,t_color(background-light),t_color(background));
background-image: none;
background-color: t_color(background);
&:backdrop {
border-color: transparent;
background-image: none;
......
......@@ -732,16 +732,13 @@ view_bg = Color(_colors, 'ViewBackgroundNormal')
view_fg = Color(_colors, 'ViewForegroundNormal')
view_hover = Color(_colors, 'ViewDecorationHover')
view_active = Color(_colors, 'ViewDecorationFocus')
titlebutton = Color(_colors, 'WindowForegroundNormal')
titlebutton_active = Color(
_colors, 'WindowBackgroundNormal', 'WindowForegroundNormal', 0.3)
titlebutton = Color(_colors, 'WMactiveForeground')
titlebutton_active = Color(_colors, 'WMactiveForeground')
closebutton_hover = Color(_colors, 'ViewForegroundNegative')
closebutton_hover.lighten_color(0.5)
closebutton_active = Color(_colors, 'ViewForegroundNegative')
titlebutton_inactive = Color(_colors, 'WindowForegroundNormal')
titlebutton_inactive_active = Color(
_colors, 'WindowBackgroundNormal', 'WindowForegroundNormal', 0.3)
titlebutton_inactive = Color(_colors, 'WMinactiveForeground')
titlebutton_inactive_active = Color(_colors, 'WMinactiveForeground')
tooltip_fg = Color(_colors, 'TooltipForegroundNormal')
tooltip_bg = Color(_colors, 'TooltipBackgroundNormal')
......
Markdown is supported
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