mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
remove button styling
qt5.7 loses system styling when zoom applied
This commit is contained in:
parent
94463991bc
commit
704610ef8f
1 changed files with 1 additions and 9 deletions
|
@ -140,18 +140,10 @@ class AnkiWebView(QWebEngineView):
|
||||||
return max(1, dpi / 96.0)
|
return max(1, dpi / 96.0)
|
||||||
|
|
||||||
def stdHtml(self, body, css="", bodyClass="", js=None, head=""):
|
def stdHtml(self, body, css="", bodyClass="", js=None, head=""):
|
||||||
if isMac:
|
|
||||||
button = "zoom: 120%;"
|
|
||||||
else:
|
|
||||||
button = "font-weight: normal;"
|
|
||||||
|
|
||||||
self.setHtml("""
|
self.setHtml("""
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html><head><style>
|
<html><head><style>
|
||||||
body { zoom: %f; }
|
body { zoom: %f; }
|
||||||
button {
|
|
||||||
%s
|
|
||||||
}
|
|
||||||
%s</style>
|
%s</style>
|
||||||
<script>
|
<script>
|
||||||
%s
|
%s
|
||||||
|
@ -160,7 +152,7 @@ button {
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="%s">%s</body></html>""" % (
|
<body class="%s">%s</body></html>""" % (
|
||||||
self.zoomFactor(), button, css, js or anki.js.jquery+anki.js.browserSel,
|
self.zoomFactor(), css, js or anki.js.jquery+anki.js.browserSel,
|
||||||
head, bodyClass, body))
|
head, bodyClass, body))
|
||||||
|
|
||||||
def setCanFocus(self, canFocus=False):
|
def setCanFocus(self, canFocus=False):
|
||||||
|
|
Loading…
Reference in a new issue