mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix theme/checkboxes when path contains an apostrophe
I couldn't find a list of other characters we might need to handle too. I tested with ", but Qt failed to start then. https://forums.ankiweb.net/t/qt-rendering-bug-in-check-boxes/66196
This commit is contained in:
parent
157da4c7a7
commit
01b825f7c6
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ class ThemeManager:
|
||||||
# Workaround for Qt bug. First attempt was percent-escaping the chars,
|
# Workaround for Qt bug. First attempt was percent-escaping the chars,
|
||||||
# but Qt can't handle that.
|
# but Qt can't handle that.
|
||||||
# https://forum.qt.io/topic/55274/solved-qss-with-special-characters/11
|
# https://forum.qt.io/topic/55274/solved-qss-with-special-characters/11
|
||||||
path = re.sub(r"([\u00A1-\u00FF])", r"\\\1", path)
|
path = re.sub(r"(['\u00A1-\u00FF])", r"\\\1", path)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def icon_from_resources(self, path: str | ColoredIcon) -> QIcon:
|
def icon_from_resources(self, path: str | ColoredIcon) -> QIcon:
|
||||||
|
|
Loading…
Reference in a new issue