mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
don't need to set bgcol when the window is transparent
This commit is contained in:
parent
7bd33242cf
commit
ea5f2bb0ef
1 changed files with 2 additions and 3 deletions
|
@ -149,7 +149,7 @@ class AnkiWebView(QWebEngineView):
|
||||||
dpi = screen.logicalDpiX()
|
dpi = screen.logicalDpiX()
|
||||||
return max(1, dpi / 96.0)
|
return max(1, dpi / 96.0)
|
||||||
|
|
||||||
def stdHtml(self, body, css="", bodyClass="", js=None, head="", bgcol=None):
|
def stdHtml(self, body, css="", bodyClass="", js=None, head=""):
|
||||||
if isWin:
|
if isWin:
|
||||||
buttonspec = "button { font-size: 12px; font-family:'Segoe UI'; }"
|
buttonspec = "button { font-size: 12px; font-family:'Segoe UI'; }"
|
||||||
fontspec = 'font-size:12px;font-family:"Segoe UI";'
|
fontspec = 'font-size:12px;font-family:"Segoe UI";'
|
||||||
|
@ -169,7 +169,7 @@ border-radius:5px; font-family: Helvetica }"""
|
||||||
html="""
|
html="""
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html><head><title>%s</title><style>
|
<html><head><title>%s</title><style>
|
||||||
body { zoom: %f; background: %s; %s }
|
body { zoom: %f; %s }
|
||||||
%s
|
%s
|
||||||
%s</style>
|
%s</style>
|
||||||
<script>
|
<script>
|
||||||
|
@ -198,7 +198,6 @@ document.addEventListener("keydown", function(evt) {
|
||||||
<body class="%s">%s</body></html>""" % (
|
<body class="%s">%s</body></html>""" % (
|
||||||
self.title,
|
self.title,
|
||||||
self.zoomFactor(),
|
self.zoomFactor(),
|
||||||
bgcol or QApplication.instance().palette().window().color().name(),
|
|
||||||
fontspec,
|
fontspec,
|
||||||
buttonspec,
|
buttonspec,
|
||||||
css, js or anki.js.jquery+anki.js.browserSel,
|
css, js or anki.js.jquery+anki.js.browserSel,
|
||||||
|
|
Loading…
Reference in a new issue