You are not logged in.

#1 2017-06-18 12:18:22

arch_hd
Member
Registered: 2017-05-25
Posts: 2

GTK/CSS on Arch

I am writing a GTK Program that uses CSS to set widget attributes (forground colors, for example). The .css file is in the same directory as the executable, and the file gets loaded at run-time, however, the css attributes are not being applied to the GTK widgets. This is a bit odd, since it works fine on a plain vanilla Debian Linux box. Is there something that needs to setup in GTK on Arch in order for this to work? Thanks!

Offline

#2 2017-06-18 12:28:36

Trilby
Forum Fellow
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 17,247
Website

Re: GTK/CSS on Arch

arch_hd wrote:

The .css file is in the same directory as the executable

So it's not packaged/installed, just built and running locally?

Have you tried putting the css in ~/.config/gtk-3.0/gtk.css

Offline

#3 2017-06-19 18:19:08

arch_hd
Member
Registered: 2017-05-25
Posts: 2

Re: GTK/CSS on Arch

Thanks for the response! Yes, I have the .css file in ~/.config/gtk-3.0/gtk.css. I also put it my home directory but still no joy. I even put it in the gtk.css file (i had to create one first), but it sill is not being parced for some reason.

Offline

#4 2017-06-19 20:57:19

The Infinity
Member
Registered: 2014-07-05
Posts: 91
Website

Re: GTK/CSS on Arch

GTK devs broke the theming API in GTK 3.x without postponing such incompatible changes to GTK 4.x.

This concerns
* the C-API for theming which has effectively been removed preventing themes like Oxygen to work anymore.
* the CSS-API which broke various themes like Breeze till the devs adjusted it to work with the new API.

The last point might be the reason for you issue.

Offline

Board footer

Powered by FluxBB