alternative 1px window outline in shadow
This is an alternative implementation of merge request !67 (closed), changing the colour of the 1px window outline in the shadow. I think this implementation addresses some of the following issues with !67 (closed) :
- I think the window outlines in !67 (closed) are too stark. This commit is designed to be a very subtle outline of the window, so subtle that you should not notice it normally, and is there to add needed contrast in cases where the background has a similar colour to the window titlebar/borders. This is achieved using an opacity of only 0.25 of the font colour on all windows.
-
!67 (closed) uses the font colour of the active window for the outline of both active and inactive windows. Instead, This commit, uses the respective font colours of both active and inactive windows. This commit simply uses the existing
fontColor()
method which has added benefits of simplicity and also having an animation state. -
!67 (closed) has a bug whereby the window outline colour doesn't actually change if you change the colour scheme (you need to restart kwin to see the colour change). This is caused by the cached shadows. In this commit, this issue is resolved by adding new global variables for the
updateShadow()
function and makingupdateShadow()
a Qt SLOT connected to a Qt SIGNAL frompaletteChanged()
.
In addition, there is another pre-existing bug in Breeze whereby a rounded corner outline in the shadow was drawn for the bottom corners in windows which do not have rounded corners at the bottom (i.e. windows without borders when not shaded) -- this bug is more noticeable with larger corner radii. This commit addresses this bug by not having rounded corner at the bottom of the shadow geometry if the window does not have borders and is not shaded. Global variables have been added for the updateShadow()
cache, and SIGNAL/SLOT connections made for a change in shaded
status so that the shadow cache gets updated.
Screenshots: Here is an X11 window with Breeze Light at 250% scaling and normal borders enabled:
Breeze Light, 250% scaling, no borders:
Breeze, 250% scaling, normal borders: