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
@ -1,8 +1,17 @@
|
||||
/*
|
||||
/*
|
||||
* 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,
|
||||
@ -11,7 +20,7 @@ b, i,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, figcaption, figure,
|
||||
article, aside, canvas, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin:0;
|
||||
@ -25,11 +34,10 @@ time, mark, audio, video {
|
||||
|
||||
body {
|
||||
line-height:1.2;
|
||||
font-family:sans-serif;
|
||||
}
|
||||
|
||||
article,aside,details,figcaption,figure,
|
||||
footer,header,hgroup,menu,nav,section {
|
||||
footer,header,hgroup,menu,nav,section {
|
||||
display:block;
|
||||
}
|
||||
|
||||
@ -69,7 +77,7 @@ table {
|
||||
hr {
|
||||
display:block;
|
||||
height:1px;
|
||||
border:0;
|
||||
border:0;
|
||||
border-top:1px solid currentColor;
|
||||
margin:1em 0;
|
||||
padding:0;
|
||||
|
@ -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