(self)
Recalculates geometry for all the margins and the editor viewport
Recalculates geometry for all the margins and the editor viewport
Recalculates geometry for all the margins and the editor viewport
def updateViewport(self):
        """Recalculates geometry for all the margins and the editor viewport
        """
        cr = self.contentsRect()
        currentX = cr.left()
        top = cr.top()
        height = cr.height()

        marginWidth = 0
        if not self._line_number_margin.isHidden():
            width = self._line_number_margin.width()
            self._line_number_margin.setGeometry(QRect(currentX, top, width, height))
            currentX += width
            marginWidth += width

        if self._marginWidth != marginWidth:
            self._marginWidth = marginWidth
            self.updateViewportMargins()
        else:
            self._setSolidEdgeGeometry()
def updateViewport ( self ) : cr = self . contentsRect ( ) currentX = cr . left ( ) top = cr . top ( ) height = cr . height ( ) marginWidth = 0 if not self . _line_number_margin . isHidden ( ) : width = self . _line_number_margin . width ( ) self . _line_number_margin . setGeometry ( QRect ( currentX , top , width , height ) ) currentX += width marginWidth += width if self . _marginWidth != marginWidth : self . _marginWidth = marginWidth self . updateViewportMargins ( ) else : self . _setSolidEdgeGeometry ( )