In PyGI (GTK3), how can I make a GtkEntry widget appear against the same background applied (by the user's theme) to the primary toolbar. I tried adding the same style class like this:
entry.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
but that class doesn't seem to be observed on a widget that isn't a GtkToolbar. So how can I cue the user's theme to apply the same styles behind a GtkEntry widget?
(If it matters, I have the GtkEntry in the first cell of a GtkHBox container. But even when I apply a fixed gradient to that HBox the whole cell holding the GtkEntry seems to mask out the background of the HBox with a flat background colour.)
Thanks.