Gtk Picture not updating

I’m writing a Python Application in GTK4 + Adwaita with Flatpak and Gnome runtime version 47.
The relevant code is here

The code is supposed to change ~3 images at ~10FPS to create an animation.
The problem is that the image does not update. When I open the inspector, I can clearly see the attribute changing, also, when I open it the image actually change for some seconds.
If I switch to GtkImage, everything works, however the image is not upscaled to adapt to its container.

How can I fix this? I remember it working on Gnome Platform 46

Not a direct answer to your question, but you probably want to implement a custom Gdk.Paintable and do the animation there.

For reference here you can find a simple Gdk.Paintable in Python for a GIF image:

But in your case I think you can avoid GdkPixbuf and create a Gdk.Texture for each frame.

So it seems this has already been fixed but the Flatpak Runtime has not been updated with it. I am not sure where to report this

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.