Change background for GtkNotebook

I’m using adwaita theme, but want original GTK Notebook widget just to organize input options:

But for some reasons I can’t change the background, using adwaita classes

I want make it same as the parental block (light gray) that placed in Clamp

Seems it’s related to this CSS but what about change the color using class, not style provider

Currently, I can change it with this patch only:

stack {
	background-color: rgba(0,0,0,0);
}

Fixed with CSS patch, maybe later will replace this widget with adwaita

fn notebook_css_patch(notebook: &Notebook) {
    let provider = gtk::CssProvider::new();

    provider.load_from_string(&format!(
        "
            #{} stack {{
                background-color: rgba(0,0,0,0);
            }}
        ", 
        notebook.widget_name()
    ));

    gtk::style_context_add_provider_for_display(
        &notebook.display(),
        &provider,
        gtk::STYLE_PROVIDER_PRIORITY_APPLICATION,
    );
}

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