Fade out Label / Button / Status Bar with GTK
- by wolfv
What is the easiest way to fade out and fade in elements in Python / GTK 3?
Coming from webdevelopment, my initial take on this problem was to call
c = widget.get_style_context(), c.remove_class('visible'), c.add_class('invisible')
but that didn't work out (Do I have to call something like "redraw"?)
I also added a transition to the GTK CSS.
Thanks,
Wolf
EDIT: I might specify what I would like to achieve: I have this "statusbar" which is just a vertical container on my app (like in the screenshot on top of this page http://uberwriter.wolfvollprecht.de/).
If the mouse is not moving, I want to fade all that stuff out (also to preserve computing power // no recalculation of word- and char count) and to minimize "distraction"). I already found the appropriate event to listen to (motion-notify-event), so now I only need to add a simple fade out and a timeout.
If someone can point me to a solution, be it with clutter or cairo, I would be very happy.