diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py index f72a2bdb..239afc25 100644 --- a/src/sugar3/graphics/alert.py +++ b/src/sugar3/graphics/alert.py @@ -342,7 +342,7 @@ class _TimeoutIcon(Gtk.Alignment): __gtype_name__ = 'SugarTimeoutIcon' def __init__(self): - GObject.GObject.__init__(self, 0, 0, 1, 1) + Gtk.Alignment.__init__(self, xalign=0, yalign=0, xscale=1, yscale=1) self.set_app_paintable(True) self._text = Gtk.Label() self._text.set_alignment(0.5, 0.5) diff --git a/src/sugar3/graphics/palette.py b/src/sugar3/graphics/palette.py index 6c24d27c..b23a28d4 100644 --- a/src/sugar3/graphics/palette.py +++ b/src/sugar3/graphics/palette.py @@ -67,8 +67,8 @@ class Palette(PaletteWindow): primary_box.pack_start(self._icon_box, False, True, 0) labels_box = Gtk.VBox() - self._label_alignment = Gtk.Alignment.new(xalign=0, yalign=0.5, - xscale=1, yscale=0.33) + self._label_alignment = Gtk.Alignment(xalign=0, yalign=0.5, xscale=1, + yscale=0.33) self._label_alignment.set_padding(0, 0, style.DEFAULT_SPACING, style.DEFAULT_SPACING) self._label_alignment.add(labels_box) diff --git a/src/sugar3/graphics/toolbarbox.py b/src/sugar3/graphics/toolbarbox.py index 458c2d67..b3217156 100644 --- a/src/sugar3/graphics/toolbarbox.py +++ b/src/sugar3/graphics/toolbarbox.py @@ -309,7 +309,7 @@ def _setup_page(page_widget, color, hpad): def _embed_page(box_class, page): page.show() - alignment = Gtk.Alignment.new(0.0, 0.0, 1.0, 1.0) + alignment = Gtk.Alignment(xscale=1.0, yscale=1.0) alignment.add(page) alignment.show() diff --git a/src/sugar3/graphics/toolbox.py b/src/sugar3/graphics/toolbox.py index e67ff164..e4e4c324 100644 --- a/src/sugar3/graphics/toolbox.py +++ b/src/sugar3/graphics/toolbox.py @@ -65,7 +65,7 @@ class Toolbox(Gtk.VBox): event_box = Gtk.EventBox() - alignment = Gtk.Alignment.new(0.0, 0.0, 1.0, 1.0) + alignment = Gtk.Alignment(xscale=1.0, yscale=1.0) alignment.set_padding(0, 0, style.TOOLBOX_HORIZONTAL_PADDING, style.TOOLBOX_HORIZONTAL_PADDING) diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py index 83c59e59..f14569b0 100644 --- a/src/sugar3/graphics/tray.py +++ b/src/sugar3/graphics/tray.py @@ -175,7 +175,7 @@ class _TrayScrollButton(ToolButton): icon_size=Gtk.IconSize.SMALL_TOOLBAR) # The alignment is a hack to work around Gtk.ToolButton code # that sets the icon_size when the icon_widget is a Gtk.Image - alignment = Gtk.Alignment.new(0.5, 0.5) + alignment = Gtk.Alignment(xalign=0.5, yalign=0.5) alignment.add(self.icon) self.set_icon_widget(alignment) alignment.show_all()