Adjust HTML editor / add-on config editor font (#3054)

* Reduce font size of add-on config editor

* Change HTML editor font to Consolas

* Remove unused form
This commit is contained in:
Abdo 2024-03-05 10:29:05 +03:00 committed by GitHub
parent 55dacf05c3
commit 3d184073d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 2 additions and 86 deletions

View file

@ -1585,7 +1585,7 @@ class ConfigEditor(QDialog):
font_mono = QFont("Consolas") font_mono = QFont("Consolas")
if not font_mono.exactMatch(): if not font_mono.exactMatch():
font_mono = QFontDatabase.systemFont(QFontDatabase.SystemFont.FixedFont) font_mono = QFontDatabase.systemFont(QFontDatabase.SystemFont.FixedFont)
font_mono.setPointSize(font_mono.pointSize() + 1) font_mono.setPointSize(font_mono.pointSize())
self.form.editor.setFont(font_mono) self.form.editor.setFont(font_mono)
def updateHelp(self) -> None: def updateHelp(self) -> None:

View file

@ -14,7 +14,6 @@ from . import (
customstudy, customstudy,
dconf, dconf,
debug, debug,
editaddon,
editcurrent, editcurrent,
edithtml, edithtml,
emptycards, emptycards,

View file

@ -1,8 +0,0 @@
from typing import TYPE_CHECKING
from aqt.qt import qtmajor
if qtmajor > 5 or TYPE_CHECKING:
from _aqt.forms.editaddon_qt6 import *
else:
from _aqt.forms.editaddon_qt5 import * # type: ignore

View file

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>753</width>
<height>475</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPlainTextEdit" name="text">
<property name="font">
<font>
<family>Courier 10 Pitch</family>
</font>
</property>
<property name="plainText">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View file

@ -103,6 +103,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
:global(.CodeMirror) { :global(.CodeMirror) {
height: auto; height: auto;
font-family: Consolas monospace;
} }
:global(.CodeMirror-wrap pre) { :global(.CodeMirror-wrap pre) {