The Issue
This is how my gtk3 app currently look like on Ubuntu 20.04:
The tree view on the left has a slightly brighter background color than the others. I created the tree view by:
tree_view = gtk_tree_view_new();
gtk_widget_set_margin_bottom(tree_view, 12);
gtk_widget_set_margin_top(tree_view, 12);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), FALSE);
All my other widgets are created similarly with modifying any styles.
Desired Behavior
I want all the bright backgrounds to match each other. I don't mind if they all become the brighter white or the darker white. An example is gtk3-demo, where all backgrounds become the brighter white, as in the tree view:
(Its stack header is still the darker white, but I don't mind that as long as the major regions match.)
Attempted Solutions
It's tempting to set it with CSS and make them match. But I realize those backgrouds can change with different themes. I still want my app to respond to theme changes. That is, if the user is using a dark theme, I still want my app to become dark (the same dark color).
Is there a way to do this? Thank you!
EDIT:
I noticed that gtk3-demo got its bright background color because it used GtkNotebook. I tried but GtkNotebook only gives a light color when it has its tabs enabled, which I don't want. Once it disable show-tabs, its background returns to the darker white.

