Paso port a sugar3 de Chat.activity<div><br></div><div>Fue probada en xo 1.75 (21011o2.zd) colaborando con xo 1.5 (dextrose 2), Funciona ok !</div><div><br></div><div>Pero, no logré el decorado de la clase RoundBox:</div><div>
<div><font color="#990000">    def redraw(self, cr):</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">             </span>rect = self.get_allocation()</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">              </span>x = rect.x + self._BORDER_DEFAULT / 2</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                </span>y = rect.y + self._BORDER_DEFAULT / 2</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">             </span>width = rect.width - self._BORDER_DEFAULT</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                </span>height = rect.height - self._BORDER_DEFAULT</font></div><div><font color="#990000"><br></font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">           </span>cr.move_to(x + self._radius, y)</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                </span>cr.arc(x + width - self._radius, y + self._radius,</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                        </span>self._radius, math.pi * 1.5, math.pi * 2)</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                </span>cr.arc(x + width - self._radius, y + height - self._radius,</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                       </span>self._radius, 0, math.pi * 0.5)</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                </span>cr.arc(x + self._radius, y + height - self._radius,</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                       </span>self._radius, math.pi * 0.5, math.pi)</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                </span>cr.arc(x + self._radius, y + self._radius, self._radius,</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                  </span>math.pi, math.pi * 1.5)</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                </span>cr.close_path()</font></div><div><font color="#990000"><br></font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">               </span>if self.background_color != None:</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                        </span>r, g, b, __ = self.background_color.get_rgba()</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                    </span>cr.set_source_rgb(r, g, b)</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                        </span>cr.fill_preserve()</font></div><div><font color="#990000"><br></font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">            </span>if self.border_color != None:</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                        </span>r, g, b, __ = self.border_color.get_rgba()</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                        </span>cr.set_source_rgb(r, g, b)</font></div>
<div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                        </span>cr.set_line_width(self.border)</font></div><div><font color="#990000"><span class="Apple-tab-span" style="white-space:pre">                    </span>cr.stroke()</font></div>
</div>