Remove the style stuff

This commit is contained in:
Marco Pesenti Gritti 2007-02-20 22:15:31 +01:00
parent 0ae5f61a07
commit 0ccaf0dac8

View File

@ -21,7 +21,7 @@ import gobject
import gtk import gtk
import hippo import hippo
from sugar.graphics import style from sugar.graphics import units
from sugar.graphics.roundbox import RoundBox from sugar.graphics.roundbox import RoundBox
from sugar.graphics import button from sugar.graphics import button
from sugar.graphics import color from sugar.graphics import color
@ -39,8 +39,7 @@ class Rollover(hippo.CanvasBox, hippo.CanvasItem):
hippo.CanvasBox.__init__(self) hippo.CanvasBox.__init__(self)
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()
#TODO: how we should specify the border thickness? self.props.border = units.points_to_pixels(1)
self.props.border = style.separator_thickness
self._window = None self._window = None
def add_item(self, action_id, label, icon_name=None, icon_color=None): def add_item(self, action_id, label, icon_name=None, icon_color=None):
@ -48,7 +47,8 @@ class Rollover(hippo.CanvasBox, hippo.CanvasItem):
box.props.padding = 5 box.props.padding = 5
box.props.spacing = 5 box.props.spacing = 5
if icon_name: if icon_name:
icon = CanvasIcon(icon_name=icon_name, scale=style.small_icon_scale) icon = CanvasIcon(icon_name=icon_name,
scale=units.SMALL_ICON_SCALE)
if icon_color: if icon_color:
icon.props.color = icon_color icon.props.color = icon_color
box.append(icon) box.append(icon)
@ -65,7 +65,7 @@ class Rollover(hippo.CanvasBox, hippo.CanvasItem):
def add_separator(self): def add_separator(self):
box = hippo.CanvasBox() box = hippo.CanvasBox()
box.props.background_color = color.MENU_SEPARATOR.get_int() box.props.background_color = color.MENU_SEPARATOR.get_int()
box.props.box_height = style.separator_thickness box.props.box_height = units.points_to_pixels(1)
self.append(box) self.append(box)
def popup(self, x, y): def popup(self, x, y):