There are some things related with <tt>gtk.DrawingArea</tt> that we have to change when we are porting an activity to Gtk3. The names of the signals change and the way that they work as well.
== Signals ==
=== expose-event ===
This signal was override by '''draw''' and it have to be connected with the method that was connected with the ''expose-event'' before. The method itself does not change but the arguments that it receives do. This is the new definition of the function in my case:
=== size-allocate ===
This signal was used to resize the gtk.DrawingArea every time the window grows and at the startup of the activity. This is useful to re-draw the widget for different resolutions (desktops and XOs for example).
def _configure_event_cb(self, widget, event):
I just used the '' size-allocate'' signal to save the the dimensions of the widget ( width and height) , so I can use them later on the ''' draw' '' signal .
def _size_allocate_cb(self, widget, rect): self. width = rect.width self.height = rect.height
= Focus =
from gi.repository import Rsvg
size-allocation' signal to save the size of the widget
gtk signals =
"draw " / "expose" / "size- "