standard blue focus highlight on windows
This commit is contained in:
parent
df4aad50e1
commit
111727240b
@ -228,10 +228,15 @@ class AnkiWebView(QWebEngineView):
|
|||||||
css = []
|
css = []
|
||||||
if js is None:
|
if js is None:
|
||||||
js = ["jquery.js"]
|
js = ["jquery.js"]
|
||||||
|
|
||||||
|
palette = self.style().standardPalette()
|
||||||
|
color_hl = palette.color(QPalette.Highlight).name()
|
||||||
|
|
||||||
if isWin:
|
if isWin:
|
||||||
#T: include a font for your language on Windows, eg: "Segoe UI", "MS Mincho"
|
#T: include a font for your language on Windows, eg: "Segoe UI", "MS Mincho"
|
||||||
family = _('"Segoe UI"')
|
family = _('"Segoe UI"')
|
||||||
widgetspec = "button { font-size: 12px; font-family:%s; }" % family
|
widgetspec = "button { font-size: 12px; font-family:%s; }" % family
|
||||||
|
widgetspec += "\n:focus { outline: 1px solid %s; }" % color_hl
|
||||||
fontspec = 'font-size:12px;font-family:%s;' % family
|
fontspec = 'font-size:12px;font-family:%s;' % family
|
||||||
elif isMac:
|
elif isMac:
|
||||||
family="Helvetica"
|
family="Helvetica"
|
||||||
@ -241,9 +246,7 @@ class AnkiWebView(QWebEngineView):
|
|||||||
button { font-size: 13px; -webkit-appearance: none; background: #fff; border: 1px solid #ccc;
|
button { font-size: 13px; -webkit-appearance: none; background: #fff; border: 1px solid #ccc;
|
||||||
border-radius:5px; font-family: Helvetica }"""
|
border-radius:5px; font-family: Helvetica }"""
|
||||||
else:
|
else:
|
||||||
palette = self.style().standardPalette()
|
|
||||||
family = self.font().family()
|
family = self.font().family()
|
||||||
color_hl = palette.color(QPalette.Highlight).name()
|
|
||||||
color_hl_txt = palette.color(QPalette.HighlightedText).name()
|
color_hl_txt = palette.color(QPalette.HighlightedText).name()
|
||||||
color_btn = palette.color(QPalette.Button).name()
|
color_btn = palette.color(QPalette.Button).name()
|
||||||
fontspec = 'font-size:14px;font-family:"%s";'% family
|
fontspec = 'font-size:14px;font-family:"%s";'% family
|
||||||
|
Loading…
Reference in New Issue
Block a user