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