'Calculate and set geometry of indentation guides panel.'

def set_geometry(self, cr):

    offset = self.editor.contentOffset()
    x = (self.editor.blockBoundingGeometry(self.editor.firstVisibleBlock()).translated(offset.x(), offset.y()).left() + 5)
    top_left = QPoint(x, cr.top())
    top_left = self.editor.calculate_real_position(top_left)
    bottom_right = QPoint((top_left.x() + cr.width()), cr.bottom())
    self.setGeometry(QRect(top_left, bottom_right))
