Using GTK 3.4.2 on ubuntu with python.
Hi Guys,
I've looked everywhere for this:
I have a horizontal box with 2 buttons, 2 labels and a seperator that I want to fade out to transparent. At first I thought I could just remove a class from a StyleContext and add another to achieve the effect (like you would do with javascript / CSS). Something like
Code:
box.get_style_context().remove_class('visible')
box.get_style_context().add_class('invisible')
But that didn't work out, because the box was not redrawn.
My next approach was (or better is) to set the box to insensitive. I can then style the box with #status_bar_box:insensitive { ... } (CSS) but there is no transition (note that I added the transition to both, normal and :insensitive).
Code:
self.status_bar.set_state_flags(Gtk.StateFlags.INSENSITIVE, True)
Has anyone solved this? Or is there a simple ""cairo"" approach that I could choose? (I would prefer CSS, it's so clean ... )
Many Thanks,
wolfv