def paint(self, cr): area = self._get_area() if area is not None: x, y, w, h = area cr.set_source_rgb(*self._color.get_rgb()) x += (self.OUTLINE_WIDTH // 2) + 1.5 y += (self.OUTLINE_WIDTH // 2) + 1.5 w -= self.OUTLINE_WIDTH + 3 h -= self.OUTLINE_WIDTH + 3 rounded_box(cr, x, y, w, h, self.CORNER_RADIUS) cr.fill_preserve() cr.set_source_rgb(0, 0, 0) cr.set_line_width(self.OUTLINE_WIDTH) cr.stroke() self._previous_area = area