mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1858779 [Fails to load KIPEO plugin](https://bugs.launchpad.net/calibre/+bug/1858779)
This commit is contained in:
parent
7474547bd2
commit
7a16568127
@ -20,7 +20,6 @@ from PyQt5.Qt import (
|
|||||||
QCheckBox, pyqtSignal, QDoubleSpinBox, QComboBox, QLabel, QFont, QApplication,
|
QCheckBox, pyqtSignal, QDoubleSpinBox, QComboBox, QLabel, QFont, QApplication,
|
||||||
QFontComboBox, QPushButton, QSizePolicy, QHBoxLayout, QGroupBox,
|
QFontComboBox, QPushButton, QSizePolicy, QHBoxLayout, QGroupBox,
|
||||||
QToolButton, QVBoxLayout, QSpacerItem, QTimer)
|
QToolButton, QVBoxLayout, QSpacerItem, QTimer)
|
||||||
from PyQt5.QtWebEngineWidgets import QWebEngineSettings
|
|
||||||
|
|
||||||
from calibre import prepare_string_for_xml
|
from calibre import prepare_string_for_xml
|
||||||
from calibre.utils.localization import get_lang
|
from calibre.utils.localization import get_lang
|
||||||
@ -345,6 +344,7 @@ class PreviewSettings(BasicSettings):
|
|||||||
self.setLayout(l)
|
self.setLayout(l)
|
||||||
|
|
||||||
def default_font(which):
|
def default_font(which):
|
||||||
|
from PyQt5.QtWebEngineWidgets import QWebEngineSettings
|
||||||
s = QWebEngineSettings.defaultSettings()
|
s = QWebEngineSettings.defaultSettings()
|
||||||
which = getattr(s, {'serif': 'SerifFont', 'sans': 'SansSerifFont', 'mono': 'FixedFont'}[which])
|
which = getattr(s, {'serif': 'SerifFont', 'sans': 'SansSerifFont', 'mono': 'FixedFont'}[which])
|
||||||
return s.fontFamily(which)
|
return s.fontFamily(which)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user