[Sugar-devel] Port Gtk 3 (Chat.activity)
Flavio Danesse
fdanesse at activitycentral.com
Mon May 21 20:58:24 EDT 2012
Paso port a sugar3 de Chat.activity
Fue probada en xo 1.75 (21011o2.zd) colaborando con xo 1.5 (dextrose 2),
Funciona ok !
Pero, no logré el decorado de la clase RoundBox:
def redraw(self, cr):
rect = self.get_allocation()
x = rect.x + self._BORDER_DEFAULT / 2
y = rect.y + self._BORDER_DEFAULT / 2
width = rect.width - self._BORDER_DEFAULT
height = rect.height - self._BORDER_DEFAULT
cr.move_to(x + self._radius, y)
cr.arc(x + width - self._radius, y + self._radius,
self._radius, math.pi * 1.5, math.pi * 2)
cr.arc(x + width - self._radius, y + height - self._radius,
self._radius, 0, math.pi * 0.5)
cr.arc(x + self._radius, y + height - self._radius,
self._radius, math.pi * 0.5, math.pi)
cr.arc(x + self._radius, y + self._radius, self._radius,
math.pi, math.pi * 1.5)
cr.close_path()
if self.background_color != None:
r, g, b, __ = self.background_color.get_rgba()
cr.set_source_rgb(r, g, b)
cr.fill_preserve()
if self.border_color != None:
r, g, b, __ = self.border_color.get_rgba()
cr.set_source_rgb(r, g, b)
cr.set_line_width(self.border)
cr.stroke()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120521/beee6ca5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Port-Gtk-3.patch
Type: application/octet-stream
Size: 38683 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120521/beee6ca5/attachment-0001.obj>
More information about the Sugar-devel
mailing list