Tweak menu layout

This commit is contained in:
Marco Pesenti Gritti 2007-03-05 13:34:31 +01:00
parent 5cc06cb5eb
commit d06c1af638

View File

@ -41,12 +41,12 @@ class MenuItem(hippo.CanvasBox):
hippo.CanvasBox.__init__(self, orientation=hippo.ORIENTATION_HORIZONTAL) hippo.CanvasBox.__init__(self, orientation=hippo.ORIENTATION_HORIZONTAL)
self._action_id = action_id self._action_id = action_id
self.props.padding = 5 self.props.spacing = units.points_to_pixels(2)
if icon_name: if icon_name:
icon = CanvasIcon(icon_name=icon_name, icon = CanvasIcon(icon_name=icon_name,
scale=units.SMALL_ICON_SCALE, scale=units.SMALL_ICON_SCALE,
box_width=units.microgrid_to_pixels(3)) box_width=units.microgrid_to_pixels(2))
if icon_color: if icon_color:
icon.props.xo_color = icon_color icon.props.xo_color = icon_color
self.append(icon) self.append(icon)
@ -93,6 +93,8 @@ class Menu(Popup):
self.props.background_color = color.MENU_BACKGROUND.get_int() self.props.background_color = color.MENU_BACKGROUND.get_int()
self.props.border_color = color.MENU_BORDER.get_int() self.props.border_color = color.MENU_BORDER.get_int()
self.props.border = units.points_to_pixels(1) self.props.border = units.points_to_pixels(1)
self.props.padding = units.points_to_pixels(3)
self.props.spacing = units.points_to_pixels(3)
if title: if title:
title_item = hippo.CanvasText(text=title) title_item = hippo.CanvasText(text=title)