r,g,b = _dec_colors[int(tag[0])]
else:
r,g,b = _dec_colors[7]
-
+
+ xoff, yoff, tw, th = ctx.text_extents(txt)[:4]
ctx.set_source_rgb(r, g, b)
- ctx.move_to(self.nick_pos[0] + xoffset, self.nick_pos[1])
+ ctx.move_to(self.nick_pos[0] + xoffset - xoff, self.nick_pos[1])
ctx.show_text(txt)
- xoff, yoff, tw, th = ctx.text_extents(txt)[:4]
tw += (len(txt)-len(txt.strip())) * space_w # account for lost whitespaces
xoffset += tw + 2