diff --git a/qt/aqt/theme.py b/qt/aqt/theme.py index 8d89eb2c3..f36be3784 100644 --- a/qt/aqt/theme.py +++ b/qt/aqt/theme.py @@ -183,8 +183,15 @@ class ThemeManager: def qcolor(self, colors: dict[str, str]) -> QColor: """Create QColor instance from CSS string for the current theme.""" - if m:= re.match(r"rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+\.*\d+?)\)", self.var(colors)): - return QColor(int(m.group(1)), int(m.group(2)), int(m.group(3)), 255 * float(m.group(4))) + if m := re.match( + r"rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+\.*\d+?)\)", self.var(colors) + ): + return QColor( + int(m.group(1)), + int(m.group(2)), + int(m.group(3)), + 255 * float(m.group(4)), + ) return QColor(self.var(colors)) def _determine_night_mode(self) -> bool: