This commit is contained in:
恍兮惚兮 2024-05-19 00:51:12 +08:00
parent 20ca07ae10
commit a2edfa15b3

View File

@ -11,6 +11,7 @@ from PyQt5.QtWidgets import (
QWidget,
QLayout,
)
from PyQt5.QtGui import QFontDatabase
from webviewpy import (
webview_native_handle_kind_t,
@ -613,8 +614,8 @@ class mshtmlWidget(QWidget):
def setHtml(self, html):
html = html.replace('target="_blank"', "")
html = "<html><head><meta http-equiv='x-ua-compatible' content='IE=edge'></head><body>{}</body></html>".format(
html
html = """<html><head><meta http-equiv='x-ua-compatible' content='IE=edge'></head><body style=" font-family:'{}'">{}</body></html>""".format(
QFontDatabase.systemFont(QFontDatabase.GeneralFont).family(), html
)
self.browser.set_html(html)
@ -648,7 +649,6 @@ class auto_select_webview(QWidget):
self.setLayout(layout)
self._maybecreate()
def _maybecreate(self):
if globalconfig["usewebview"] != self.contex:
if globalconfig["usewebview"] == 1 and self.cantusewebview2: