Feature Request: Allow to change the Titlebar to dark but leave the light theme for desktop in general

So with GNOME currently it is only possible to switch to “Light” or “Dark” themes. But there are applications like GIMP, IDE code editors that are generally “darK” and are never supposed to be light. But it looks really strange when you have the “Light” theme turned on as desktop theme but then you open GIMP and you see this white titlebar staring at you and it looks out of place with the rest of the application.

It would be nice if you could turn only the titlebar dark for some applications. Because I don’t want to turn my whole desktop to “Dark” mode.

Look at the screenshot (the white titlebar looks out of place and ugly):

As I commented on the gnome-shell issue you opened for the same thing, applications can already do that.

But note that that supports dates back to 2011, so I wouldn’t get my hope up too much that applications that aren’t using it by now will suddenly start supporting it.

As I commented on the gnome-shell issue you opened for the same thing, applications can already do that.

But note that that supports dates back to 2011, so I wouldn’t get my hope up too much that applications that aren’t using it by now will suddenly start supporting it.

@fmuellner Is there any way that I as a user can force an application to use a dark titlebar? Perhaps there is a “hacky” workaround for this?

You can set the property externally with xprop:

$ xprop -format _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark

But that only works for open windows, that is: you have to repeat it every time you start the app, and for every window the app opens.

@fmuellner I could watch for opened windows and add a hook that sets the xprop.

But won’t that set dark theme for the whole app instead of just the titlebar?

The short answer: No.

The property exists to communicate an app preference to the window manager. The window manager is responsible for drawing the titlebar at most (that is, if the application doesn’t use a client-side custom titlebar), so it doesn’t touch anything inside the app window.

An application could listen to the property on its window and do something in response.

But it’s a pretty safe bet that apps that have a dark stylesheet and don’t set the property themselves won’t be listening to it either.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.