I'm looking for a way, on a PyGObject application, to be notified when there is a theme change.
I need this notification because I'm plotting a graph using matplotlib
and I'm setting as text color for the Graph the standard label color of the current GTK3 theme:
temp_label = Gtk.Label()
scrolled_window.add(temp_label)
text_color = rgba_to_hex(temp_label.get_style_context().get_color(Gtk.StateType.NORMAL))
But, when the user switches theme, I need to fetch the new label color and redraw the graph.
Currently, going from a dark to a light theme, makes the labels unreadable: