Fix plugin colours on Qt 6.12
Qt 6.12's QtQuick exports a Color singleton, which hides the Omarchy and Noctalia kits' Commons.Color: every Color.foreground read undefined, so plugin buttons, toggles and text fell back to black. The kits now import QtQuick 6.8, which predates it, and the installer pins the same version in plugin files that use Color (reinstall plugins to pick it up). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fc272e45b2
commit
84c2385cfa
77 files changed
+99
-74
No files matched your search
@@ -24,6 +24,7 @@ COMPAT = Path(__file__).resolve().parent.parent / 'compat'
|
||||
ID_RE = re.compile(r'^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$')
|
||||
META = '.glassmxrph.json'
|
||||
REWRITES = {'qs.Ui': 'qs.compat.omarchy.Ui', 'qs.Commons': 'qs.compat.omarchy.Commons'}
|
||||
COLOR_USE = re.compile(r'(?<![\w."])Color\.')
|
||||
|
||||
|
||||
def ecosystem(manifest):
|
||||
@@ -160,6 +161,10 @@ def rewrite_imports(directory, eco='omarchy'):
|
||||
else:
|
||||
for old, compat in REWRITES.items():
|
||||
new = re.sub(r'^(\s*import\s+)' + re.escape(old) + r'(\s*)$', r'\g<1>' + compat + r'\g<2>', new, flags=re.M)
|
||||
# Qt 6.12's QtQuick exports a Color singleton that hides the kits'
|
||||
# Commons.Color; an older QtQuick version leaves it out.
|
||||
if COLOR_USE.search(new):
|
||||
new = re.sub(r'^(\s*import\s+QtQuick)(\s*)$', r'\g<1> 6.8\g<2>', new, flags=re.M)
|
||||
if new != text:
|
||||
path.write_text(new)
|
||||
|
||||
|
||||
Reference in new issue
Block a user