From 06a5ada99bec6770249c7ec59b190794b6e1bc47 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 31 May 2023 16:41:12 +1000 Subject: [PATCH] Apply Latin1 fix to other platforms While much less likely on other platforms (with no current reports and /Applications or /usr/share folders being the norm), the issue could still occur. --- qt/aqt/theme.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qt/aqt/theme.py b/qt/aqt/theme.py index b64b8b29b..6acd5463d 100644 --- a/qt/aqt/theme.py +++ b/qt/aqt/theme.py @@ -110,12 +110,10 @@ class ThemeManager: filename = f"{name}-{'dark' if self.night_mode else 'light'}.svg" path = os.path.join(aqt_data_folder(), "qt", "icons", filename) path = path.replace("\\\\?\\", "").replace("\\", "/") - if is_win: - # Workaround for Qt bug. First attempt was percent-escaping the chars, - # but Qt can't handle that. No reports so far of this affecting - # other platforms, so it's limited to Windows for now. - # https://forum.qt.io/topic/55274/solved-qss-with-special-characters/11 - path = re.sub(r"([\u00A1-\u00FF])", r"\\\1", path) + # Workaround for Qt bug. First attempt was percent-escaping the chars, + # but Qt can't handle that. + # https://forum.qt.io/topic/55274/solved-qss-with-special-characters/11 + path = re.sub(r"([\u00A1-\u00FF])", r"\\\1", path) return path def icon_from_resources(self, path: str | ColoredIcon) -> QIcon: