Tweak optionmenu and entry paddings

This commit is contained in:
Marco Pesenti Gritti 2007-03-05 12:43:32 +01:00
parent 5ae521be77
commit 5cc06cb5eb
3 changed files with 3 additions and 2 deletions

View File

@ -58,6 +58,7 @@ class Entry(hippo.CanvasBox, hippo.CanvasItem):
self._round_box = RoundBox() self._round_box = RoundBox()
self._round_box.props.border_color = color.FRAME_BORDER.get_int() self._round_box.props.border_color = color.FRAME_BORDER.get_int()
self._round_box.props.padding = units.points_to_pixels(2)
self.append(self._round_box, hippo.PACK_EXPAND) self.append(self._round_box, hippo.PACK_EXPAND)
self._canvas_widget = hippo.CanvasWidget() self._canvas_widget = hippo.CanvasWidget()

View File

@ -66,7 +66,7 @@ class OptionMenu(hippo.CanvasBox, hippo.CanvasItem):
self._round_box = RoundBox() self._round_box = RoundBox()
self._round_box.props.border_color = color.FRAME_BORDER.get_int() self._round_box.props.border_color = color.FRAME_BORDER.get_int()
self._round_box.props.spacing = units.points_to_pixels(3) self._round_box.props.spacing = units.points_to_pixels(3)
self._round_box.props.padding = units.points_to_pixels(1) self._round_box.props.padding = units.points_to_pixels(3)
self.append(self._round_box, hippo.PACK_EXPAND) self.append(self._round_box, hippo.PACK_EXPAND)
self._canvas_text = hippo.CanvasText(text=_('No options'), self._canvas_text = hippo.CanvasText(text=_('No options'),

View File

@ -25,7 +25,7 @@ from sugar.graphics import color
class RoundBox(hippo.CanvasBox, hippo.CanvasItem): class RoundBox(hippo.CanvasBox, hippo.CanvasItem):
__gtype_name__ = 'SugarRoundBox' __gtype_name__ = 'SugarRoundBox'
_BORDER_DEFAULT = 2.0 _BORDER_DEFAULT = units.points_to_pixels(1.0)
def __init__(self, **kwargs): def __init__(self, **kwargs):
hippo.CanvasBox.__init__(self, **kwargs) hippo.CanvasBox.__init__(self, **kwargs)