Zoomable GTK widget

Hi,

I’m looking for any way to scale up/down a GTK widget, ideally any kind of a container with all its children, so ultimately I would be able to zoom in/out whole widget :wink:

I tried some experiments with calling scale() on Gtk.Snapshot but then all the mouse coordinates are affected and it’s super hard to do anything about it :frowning:

I appreciate any suggestions…

You should apply zoom when allocating the child widget, not when snapshotting. I.e. call Gtk.Widget.allocate on your child in your size_allocate vfunc, passing a transform that has the zoom applied.

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