Exemple #1
0
    def __init__(self, parent):
        from cola.prefs import diff_font, tab_width

        QtGui.QTextEdit.__init__(self, parent)
        self.setMinimumSize(QtCore.QSize(1, 1))
        self.setLineWrapMode(QtGui.QTextEdit.NoWrap)
        self.setAcceptRichText(False)
        self.setFont(diff_font())
        self.set_tab_width(tab_width())
        self.setCursorWidth(2)
Exemple #2
0
 def __init__(self, parent):
     QtGui.QTextEdit.__init__(self, parent)
     self.setMinimumSize(QtCore.QSize(1, 1))
     self.setLineWrapMode(QtGui.QTextEdit.NoWrap)
     self.setAcceptRichText(False)
     self.setCursorWidth(2)
     self.setTextInteractionFlags(Qt.TextSelectableByKeyboard |
                                  Qt.TextSelectableByMouse)
     # Diff/patch syntax highlighter
     self.syntax = DiffSyntaxHighlighter(self.document())
     self.setFont(diff_font())
     self.set_tab_width(tab_width())