mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
macOS: Fix viewer controls not using system UI font
This commit is contained in:
parent
b966cdcef7
commit
3bcf55d571
@ -2,7 +2,16 @@
|
||||
* Reset CSS to suppress cross-browser differences
|
||||
*/
|
||||
|
||||
html, body, div, span, object, iframe,
|
||||
html, body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:0;
|
||||
outline:0;
|
||||
vertical-align:baseline;
|
||||
background:transparent;
|
||||
}
|
||||
|
||||
div, span, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
abbr, address, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, samp,
|
||||
@ -25,7 +34,6 @@ time, mark, audio, video {
|
||||
|
||||
body {
|
||||
line-height:1.2;
|
||||
font-family:sans-serif;
|
||||
}
|
||||
|
||||
article,aside,details,figcaption,figure,
|
||||
|
@ -535,9 +535,12 @@ class WebView(RestartingWebEngineView):
|
||||
def on_bridge_ready(self):
|
||||
f = QApplication.instance().font()
|
||||
fi = QFontInfo(f)
|
||||
family = f.family()
|
||||
if family in ('.AppleSystemUIFont', 'MS Shell Dlg 2'):
|
||||
family = 'system-ui'
|
||||
ui_data = {
|
||||
'all_font_families': QFontDatabase().families(),
|
||||
'ui_font_family': f.family(),
|
||||
'ui_font_family': family,
|
||||
'ui_font_sz': '{}px'.format(fi.pixelSize()),
|
||||
'show_home_page_on_ready': self.show_home_page_on_ready,
|
||||
'system_colors': system_colors(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user