From 863af235b419858fe22f768a961aae38453e899c Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Wed, 17 Oct 2007 13:40:58 +0000 Subject: Refinements on the spacing in the alert Made the alert 75px wide, and 15px at left and right --- (limited to 'lib') diff --git a/lib/sugar/graphics/alert.py b/lib/sugar/graphics/alert.py index ef93a5a..dd1bcec 100644 --- a/lib/sugar/graphics/alert.py +++ b/lib/sugar/graphics/alert.py @@ -64,29 +64,27 @@ class Alert(gtk.EventBox, gobject.GObject): self.set_visible_window(True) self._hbox = gtk.HBox() + self._hbox.set_border_width(style.DEFAULT_SPACING) + self._hbox.set_spacing(style.DEFAULT_SPACING) self.add(self._hbox) self._title = None self._msg = None self._icon = None - self._timeout = 0 self._buttons = {} - + self._msg_box = gtk.VBox() self._title_label = gtk.Label() - size = style.zoom(style.GRID_CELL_SIZE * 0.5) self._title_label.set_alignment(0, 0.5) - self._title_label.set_padding(style.DEFAULT_SPACING, 0) self._msg_box.pack_start(self._title_label, False) self._title_label.show() self._msg_label = gtk.Label() self._msg_label.set_alignment(0, 0.5) - self._msg_label.set_padding(style.DEFAULT_SPACING, 0) self._msg_box.pack_start(self._msg_label, False) + self._hbox.pack_start(self._msg_box, False) self._msg_label.show() - self._hbox.pack_start(self._msg_box) - + self._buttons_box = gtk.HButtonBox() self._buttons_box.set_layout(gtk.BUTTONBOX_END) self._buttons_box.set_spacing(style.DEFAULT_SPACING) @@ -94,7 +92,6 @@ class Alert(gtk.EventBox, gobject.GObject): self._buttons_box.show() self._msg_box.show() - self._hbox.show() self.show() @@ -110,7 +107,7 @@ class Alert(gtk.EventBox, gobject.GObject): elif pspec.name == 'icon': if self._icon != value: self._icon = value - self._hbox.pack_start(self._icon) + self._hbox.pack_start(self._icon, False) self._hbox.reorder_child(self._icon, 0) def do_get_property(self, pspec): -- cgit v0.9.1