Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-07-06 13:21:50 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-07-06 13:21:50 (GMT)
commit739dbafa97525f3a92425fbaf0033d2d58a0a260 (patch)
treebc4ce8af01fcb61b31d984bd15c26e7b35c6d114 /sugar
parent943214dee35df019efa266446a8e544b97fcbafd (diff)
Improve tooltips sizing
Diffstat (limited to 'sugar')
-rw-r--r--sugar/_sugarext.defs9
-rw-r--r--sugar/graphics/palette.py2
2 files changed, 11 insertions, 0 deletions
diff --git a/sugar/_sugarext.defs b/sugar/_sugarext.defs
index 93c85c9..7bc3cda 100644
--- a/sugar/_sugarext.defs
+++ b/sugar/_sugarext.defs
@@ -26,6 +26,15 @@
;; From sugar-menu.h
+(define-method set_min_width
+ (of-object "SugarMenu")
+ (c-name "sugar_menu_set_min_width")
+ (return-type "none")
+ (parameters
+ '("gint" "width")
+ )
+)
+
(define-method popup
(of-object "SugarMenu")
(c-name "sugar_menu_popup")
diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py
index a22df74..dc51fe5 100644
--- a/sugar/graphics/palette.py
+++ b/sugar/graphics/palette.py
@@ -77,6 +77,7 @@ class Palette(gobject.GObject):
self._popdown_anim.add(_PopdownAnimation(self))
self._menu = _sugarext.Menu()
+ self._menu.set_min_width(units.grid_to_pixels(1))
self._primary = _PrimaryMenuItem(label, accel_path)
self._menu.append(self._primary)
@@ -275,6 +276,7 @@ class Palette(gobject.GObject):
class _PrimaryMenuItem(gtk.MenuItem):
def __init__(self, label, accel_path):
gtk.MenuItem.__init__(self)
+ self.set_border_width(units.points_to_pixels(1))
self._set_label(label, accel_path)
def set_label(self, label, accel_path):