118 self.vsb2 = self.contents_2.verticalScrollBar() |
118 self.vsb2 = self.contents_2.verticalScrollBar() |
119 self.hsb2 = self.contents_2.horizontalScrollBar() |
119 self.hsb2 = self.contents_2.horizontalScrollBar() |
120 |
120 |
121 self.on_synchronizeCheckBox_toggled(True) |
121 self.on_synchronizeCheckBox_toggled(True) |
122 |
122 |
123 if Utilities.isWindowsPlatform(): |
123 font = Preferences.getEditorOtherFonts("MonospacedFont") |
124 self.contents_1.setFontFamily("Lucida Console") |
124 self.contents_1.setFontFamily(font.family()) |
125 self.contents_2.setFontFamily("Lucida Console") |
125 self.contents_1.setFontPointSize(font.pointSize()) |
126 else: |
126 self.contents_2.setFontFamily(font.family()) |
127 self.contents_1.setFontFamily("Monospace") |
127 self.contents_2.setFontPointSize(font.pointSize()) |
128 self.contents_2.setFontFamily("Monospace") |
|
129 self.fontHeight = QFontMetrics(self.contents_1.currentFont()).height() |
128 self.fontHeight = QFontMetrics(self.contents_1.currentFont()).height() |
130 |
129 |
131 self.cNormalFormat = self.contents_1.currentCharFormat() |
130 self.cNormalFormat = self.contents_1.currentCharFormat() |
132 self.cInsertedFormat = self.contents_1.currentCharFormat() |
131 self.cInsertedFormat = self.contents_1.currentCharFormat() |
133 self.cInsertedFormat.setBackground(QBrush(QColor(190, 237, 190))) |
132 self.cInsertedFormat.setBackground(QBrush(QColor(190, 237, 190))) |