def detectRevisionMarginWidth(self):
     """Caculates the margin width depending on
        the margin font and the current zoom"""
     skin = GlobalData().skin
     font = QFont(skin.lineNumFont)
     font.setPointSize(font.pointSize() + self.getZoom())
     fontMetrics = QFontMetrics(font, self)
     return fontMetrics.width('W' * self.__maxLength) + 3
Пример #2
0
def getZoomedMarginFont():
    """Provides the current margin font respecting zoom"""
    font = QFont(GlobalData().skin['lineNumFont'])
    font.setPointSize(font.pointSize() + Settings()['zoom'])
    return font
Пример #3
0
def getZoomedCFBadgeFont():
    """Provides the current control flow badge font respecting zoom"""
    font = QFont(GlobalData().skin['badgeFont'])
    font.setPointSize(font.pointSize() + Settings()['flowZoom'])
    return font
Пример #4
0
def getZoomedCFMonoFont():
    """Provides the current mono font respecting zoom"""
    font = QFont(GlobalData().skin['cfMonoFont'])
    font.setPointSize(font.pointSize() + Settings()['flowZoom'])
    return font