From 74de1face750607833f7da660e6b95e0d9af6a70 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 12 Jul 2016 16:28:14 +1000 Subject: [PATCH] specify font size again on osx we lose the native button appearance, but the text is too small to read on OSX otherwise --- aqt/webview.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/aqt/webview.py b/aqt/webview.py index 4459609d9..9df4d506d 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -140,19 +140,26 @@ class AnkiWebView(QWebEngineView): return max(1, dpi / 96.0) def stdHtml(self, body, css="", bodyClass="", js=None, head=""): + buttonspec = "" if isWin: - fontspec = 'font-size:12px;font-family:"Segoe UI";font-weight: medium;' + fontspec = 'font-size:12px;font-family:"Segoe UI";' elif isMac: - fontspec = "" + family=".AppleSystemUIFont" + fontspec = 'font-size:16px;font-family:"%s";'% \ + family + buttonspec = """ +button { font-size: 14px; -webkit-appearance: none; background: #fff; border: 1px solid #ccc; +border-radius:5px;}""" else: family = self.font().family() - fontspec = 'font-size:14px;font-family:%s;font-weight:medium;'%\ + fontspec = 'font-size:14px;font-family:%s;'%\ family self.setHtml(""" %s