mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
Fixes FullScreenEditor with MDEditView
This commit is contained in:
parent
7b29d332c5
commit
9baea11791
|
@ -64,7 +64,10 @@ class BasicHighlighter(QSyntaxHighlighter):
|
|||
else:
|
||||
opt = self.editor._themeData
|
||||
self.defaultTextColor = QColor(opt["Text/Color"])
|
||||
self.backgroundColor = QColor(opt["Background/Color"])
|
||||
self.backgroundColor = F.mixColors(
|
||||
QColor(opt["Foreground/Color"]),
|
||||
QColor(opt["Background/Color"]),
|
||||
int(opt["Foreground/Opacity"])/100.)
|
||||
self.markupColor = F.mixColors(self.defaultTextColor,
|
||||
self.backgroundColor,
|
||||
.3)
|
||||
|
|
|
@ -24,6 +24,10 @@ class MDEditView(textEditView):
|
|||
self._textFormat = "md"
|
||||
self._highlighterClass = MarkdownHighlighter
|
||||
|
||||
if index:
|
||||
# We have to setup things anew, for the highlighter notably
|
||||
self.setCurrentModelIndex(index)
|
||||
|
||||
# def focusInEvent(self, event):
|
||||
# """Finds textFormatter and attach them to that view."""
|
||||
# textEditView.focusInEvent(self, event)
|
||||
|
|
|
@ -83,9 +83,9 @@ class textEditView(QTextEdit):
|
|||
else:
|
||||
self.spellcheck = False
|
||||
|
||||
# if self._highlighting and not self.highlighter:
|
||||
# self.highlighter = self._highlighterClass(self)
|
||||
# self.highlighter.setDefaultBlockFormat(self._defaultBlockFormat)
|
||||
if self._highlighting and not self.highlighter:
|
||||
self.highlighter = self._highlighterClass(self)
|
||||
self.highlighter.setDefaultBlockFormat(self._defaultBlockFormat)
|
||||
|
||||
def getDefaultLocale(self):
|
||||
default_locale = enchant.get_default_language()
|
||||
|
|
Loading…
Reference in a new issue