diff --git a/BlocksScreen/lib/ui/mainWindow.ui b/BlocksScreen/lib/ui/mainWindow.ui index 451677f2..253be875 100644 --- a/BlocksScreen/lib/ui/mainWindow.ui +++ b/BlocksScreen/lib/ui/mainWindow.ui @@ -114,8 +114,7 @@ MainWindow - - :/background/logoblocks.png:/background/logoblocks.png + Qt::LeftToRight diff --git a/tests/ui/test_resource_keys_unit.py b/tests/ui/test_resource_keys_unit.py index 08d4d308..1240a28e 100644 --- a/tests/ui/test_resource_keys_unit.py +++ b/tests/ui/test_resource_keys_unit.py @@ -6,6 +6,8 @@ the panel, which is how the keys in XFAIL_KEYS survived for months and how all 10 topbar filament icons shipped in a fallback font. These tests turn that silent failure into a red test. + +Scans .py and .ui: Designer stores keys as bare element text, 56 such sites. """ import importlib @@ -28,11 +30,11 @@ ), } -# Deliberately a text scan, not an AST walk: an AST walk only sees ast.Constant, -# so it would silently drop the wifi f-string template above. The optional slash -# catches ":ui/..." too, which Qt resolves the same as ":/ui/..." (verified) and -# which 6 sites in this package use. The trailing + excludes a bare ":". -_LITERAL = re.compile(r'["\'](:/?[^"\'\s]+)["\']') +# Text scan not AST (misses .ui XML); '/' drops ": %s", spaces admit Momcake keys. +_PY_LITERAL = re.compile(r'["\'](:/?[^"\'\s][^"\']*/[^"\']*)["\']') + +# .ui keys are unquoted element text: :/x/y.svg. +_UI_LITERAL = re.compile(r">(:/?[^<\s][^<]*/[^<]*)<") # Matches the CSS in an .svg