How to change GTK Notebook header background color?

Viewed 131

I am designing a GUI in Glade and Python GTK 3. I want to change the background color of a GTK Notebook's header (the darker grey in the image below).

enter image description here

I've tried this CSS:

.header.top {
    border-width: 0;
    background-color: red;
}

and this code (and many other combinations):

self.provider = Gtk.CssProvider()
self.provider.load_from_file(Gio.File.new_for_path('styles.css'))
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), self.provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
self.measurements_notebook.get_style_context().add_class('header.top')

but it does not work.

How can I do this?

0 Answers
Related