3
votes

I have a GTK widget named Cloud (which basically subclasses Gtk.Eventbox) as a Cairo surface painted with a SVG. I'm trying to display other Gtk widgets (Label/Buttons) over it.

I tried adding Gtk.Label elements to the Cloud but they are not shown over the surface.

Using Gtk.Fixed and to position the Cloud under the label doesn't work either.

How do I draw a Gtk widget on a Cairo surface?

1

1 Answers

2
votes

I don't know what a Cloud GTK widget is; but more generally, you can use a Gtk.Overlay. add() the cloud widget as its main child, then add_overlay() the other widgets.