mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
monospace font in html editor
https://forums.ankiweb.net/t/change-default-font-of-html-edit-mode-to-a-monospaced-font/7833
This commit is contained in:
parent
32af54cd4d
commit
e218604708
2 changed files with 17 additions and 17 deletions
|
@ -589,6 +589,9 @@ class Editor:
|
||||||
qconnect(
|
qconnect(
|
||||||
form.buttonBox.helpRequested, lambda: openHelp(HelpPage.EDITING_FEATURES)
|
form.buttonBox.helpRequested, lambda: openHelp(HelpPage.EDITING_FEATURES)
|
||||||
)
|
)
|
||||||
|
font = QFont("Courier")
|
||||||
|
font.setStyleHint(QFont.TypeWriter)
|
||||||
|
form.textEdit.setFont(font)
|
||||||
form.textEdit.setPlainText(self.note.fields[field])
|
form.textEdit.setPlainText(self.note.fields[field])
|
||||||
d.show()
|
d.show()
|
||||||
form.textEdit.moveCursor(QTextCursor.End)
|
form.textEdit.moveCursor(QTextCursor.End)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>Dialog</class>
|
<class>Dialog</class>
|
||||||
<widget class="QDialog" name="Dialog">
|
<widget class="QDialog" name="Dialog">
|
||||||
|
@ -14,11 +15,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="textEdit" >
|
<widget class="QPlainTextEdit" name="textEdit"/>
|
||||||
<property name="acceptRichText" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
|
Loading…
Reference in a new issue