mate-desktop / mate-themes

Official themes for the MATE desktop
https://mate-desktop.org
GNU Lesser General Public License v2.1
76 stars 45 forks source link

Most Mate desktop themes do not indicate window focus in new gtk header bar #277

Open computerix opened 4 years ago

computerix commented 4 years ago

I use mate themes with the xfce desktop. Several xfce dialogs and windows have recently been converted to client side decorations, i.e. to the new gtk header bar instead of a window-manager-drawn title bar.

When using original gtk themes, the header bar changes its appearance when the window gets or looses focus. Hence, the header bar visually indicates if a window currently is the top window receiving input or not.

With most Mate themes (GreenLaguna, Blue and Green Submarine, Traditional Green and Ok, perhaps others), the header bar shows no visual difference between the focussed and non-focussed state, which makes finding the current top window harder.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/92641555-most-mate-desktop-themes-do-not-indicate-window-focus-in-new-gtk-header-bar?utm_campaign=plugin&utm_content=tracker%2F293056&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F293056&utm_medium=issues&utm_source=github).
lukefromdc commented 4 years ago

This is actually something you can fix locally on your own system, if you want to either edit individual theme css files where they are installed or pick a color for ALL header bars regardless of theme. The latter has the advantage of not getting overwritten by theme updates. If (as a simple example) you wanted black headerbars when focussed and grey when not, in all themes, adding this code to ~/config/gtk-3.0/gtk.css (or making that file and adding this to it) would work:

window>widget>.titlebar,/for Firefox CSD/ .csd headerbar, .csd .titlebar { background-image: none; background-color: #000000; }

headerbar:backdrop, .csd headerbar:backdrop,.csd .titlebar:backdrop { background-image: none; background-color:#525252;

Adding this code to a theme's gtk.css file should do the same thing in that theme only (until an update overwrites it) so long as you put it at the bottom to override anything above it. I directly tested the ~/config/gtk-3.0/gtk.css just now for you with the code given.

Basicallt, themes have to support the backdrop state for the headerbar to show focus, backdrop being whenever the window is NOT focussed. BlackMATE (which borrows code from my UbuntuStudio_Legacy at https://github.com/lukefromdc/gtk-theme-ubuntustudio-legacy theme) does, the other mate-themes do not seem to. As I recall theme devs here did not want to go down the road of changing themes for elements all through the window in the backdrop state, though (as I did in BlackMATE) it is of course possible to do it for the headerbar and nothing else.

You might be best off using themes meant for XFCE, as they are intended to cover all the various elements of it. If none of them satisfy you, any properly written GTK theme should work, though be advised themes written to support any particular DE might be missing elements for other DE's. We had to add fallback code to mate-panel so it would work in Adwaita (meant for GNOME but GTK's default) because of that.

Adwaita should always work, if an app doesn't work with it but is a GTK app, that is the app's fault. If you like a mixed light-dark theme, mine might satisfy you. For a full dark theme try BlackMATE or Adwaita-Dark, The MATE themes are of course written to support MATE but to work in non-MATE apps. None the less, we don't put the same energy into supporting elements not used in MATE that we do for MATE, especially with a ton of open PR's right now and a very small team.