22 |
22 |
23 from .SvnDialogMixin import SvnDialogMixin |
23 from .SvnDialogMixin import SvnDialogMixin |
24 from .Ui_SvnDiffDialog import Ui_SvnDiffDialog |
24 from .Ui_SvnDiffDialog import Ui_SvnDiffDialog |
25 |
25 |
26 import Utilities |
26 import Utilities |
|
27 import Preferences |
27 |
28 |
28 |
29 |
29 class SvnDiffDialog(QWidget, SvnDialogMixin, Ui_SvnDiffDialog): |
30 class SvnDiffDialog(QWidget, SvnDialogMixin, Ui_SvnDiffDialog): |
30 """ |
31 """ |
31 Class implementing a dialog to show the output of the svn diff command. |
32 Class implementing a dialog to show the output of the svn diff command. |
45 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
46 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
46 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
47 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
47 |
48 |
48 self.vcs = vcs |
49 self.vcs = vcs |
49 |
50 |
50 if Utilities.isWindowsPlatform(): |
51 font = Preferences.getEditorOtherFonts("MonospacedFont") |
51 self.contents.setFontFamily("Lucida Console") |
52 self.contents.setFontFamily(font.family()) |
52 else: |
53 self.contents.setFontPointSize(font.pointSize()) |
53 self.contents.setFontFamily("Monospace") |
|
54 |
54 |
55 self.cNormalFormat = self.contents.currentCharFormat() |
55 self.cNormalFormat = self.contents.currentCharFormat() |
56 self.cAddedFormat = self.contents.currentCharFormat() |
56 self.cAddedFormat = self.contents.currentCharFormat() |
57 self.cAddedFormat.setBackground(QBrush(QColor(190, 237, 190))) |
57 self.cAddedFormat.setBackground(QBrush(QColor(190, 237, 190))) |
58 self.cRemovedFormat = self.contents.currentCharFormat() |
58 self.cRemovedFormat = self.contents.currentCharFormat() |