diff options
Diffstat (limited to 'src/sugar3/graphics/roundbox.py')
-rw-r--r-- | src/sugar3/graphics/roundbox.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sugar3/graphics/roundbox.py b/src/sugar3/graphics/roundbox.py index e1e2b80..264c402 100644 --- a/src/sugar3/graphics/roundbox.py +++ b/src/sugar3/graphics/roundbox.py @@ -21,23 +21,23 @@ STABLE. import math -import hippo +from gi.repository import Hippo from sugar3.graphics import style -class CanvasRoundBox(hippo.CanvasBox, hippo.CanvasItem): +class CanvasRoundBox(Hippo.CanvasBox, Hippo.CanvasItem): __gtype_name__ = 'SugarRoundBox' _BORDER_DEFAULT = style.LINE_WIDTH def __init__(self, **kwargs): - hippo.CanvasBox.__init__(self, **kwargs) + gobject.GObject.__init__(self, **kwargs) # TODO: we should calculate radius depending on the height of the box. self._radius = style.zoom(10) - self.props.orientation = hippo.ORIENTATION_HORIZONTAL + self.props.orientation = Hippo.Orientation.HORIZONTAL self.props.border = self._BORDER_DEFAULT self.props.border_left = self._radius self.props.border_right = self._radius @@ -61,11 +61,11 @@ class CanvasRoundBox(hippo.CanvasBox, hippo.CanvasItem): cr.arc(x + self._radius, y + self._radius, self._radius, math.pi, math.pi * 1.5) - hippo.cairo_set_source_rgba32(cr, self.props.background_color) + Hippo.cairo_set_source_rgba32(cr, self.props.background_color) cr.fill_preserve() # TODO: we should be more consistent here with the border properties. if self.props.border_color: - hippo.cairo_set_source_rgba32(cr, self.props.border_color) + Hippo.cairo_set_source_rgba32(cr, self.props.border_color) cr.set_line_width(self.props.border_top) cr.stroke() |