Skip to content

Qualify shell palette references for Qt 6.12 (port of upstream #14553) - #759

Open
dstrbad wants to merge 1 commit into
omacom:quattrofrom
dstrbad:fix-qt612-color-singleton
Open

dstrbad wants to merge 1 commit into
omacom:quattrofrom
dstrbad:fix-qt612-color-singleton

Conversation

@dstrbad

@dstrbad dstrbad commented Oct 22, 2026 •

Copy link
Copy Markdown

Problem

After upgrading to Qt 6.12.0 (qt6-base 6.12.0-3, qt6-declarative 6.12.0-2) and quickshell 0.3.2, the shell loses all theme colors: the launcher (Super+Space) opens as a black box, and the bar, menus, notifications, lock screen and polkit dialog are affected the same way. The journal fills with:

WARN scene: @Ui/Button.qml[57:-1]: TypeError: Cannot read property 'background' of undefined
WARN scene: @plugins/bar/Bar.qml[66:3]: Unable to assign [undefined] to QColor

Cause

Qt 6.12 adds a Color type to QtQuick that shadows the qs.Commons Color singleton, so every unqualified Color.* lookup resolves to undefined.

Fix

Port of upstream omacom/omarchy#14553: files that use the palette now import qs.Commons as Commons and reference it as Commons.Color.*. The singleton keeps its name, so plugins written against upstream keep working. Upstream's patch doesn't apply cleanly because the fork has diverged, so I applied the same change across the 54 shell files that need it, including Commons/Border.qml and Commons/Style.qml. test/shell.d/bar-test.sh gets upstream's assertion update.

An earlier version of this PR renamed the singleton to ThemeColor. I replaced that to match upstream.

Testing

On aarch64 (Asahi, Qt 6.12.0, quickshell 0.3.2):

  • I started this branch's shell as a test instance: it logged 0 undefined errors. The stock 4.0.3 shell logs hundreds.
  • test/shell.d/bar-test.sh passes.
  • test/shell: the only files that fail are 7 that also fail on unmodified origin/quattro (arm-channel-staging, arm-package-recovery, config, package-build-contract, screenshot-sanity, settings-package-units, unowned-system-paths).

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous test mismatch is fixed and no new actionable issues were found.

Summary

The current patch qualifies palette references as Commons.Color rather than renaming the singleton to ThemeColor.

  • Shell surfaces read theme colors through a qualified palette name.

Reviews (2) · Last reviewed commit: "Qualify shell palette references for Qt ..." · Reviewed by Greptile

Comment thread shell/plugins/bar/Bar.qml Resolved
Qt 6.12 adds a Color type to QtQuick that shadows the qs.Commons Color
singleton, so every unqualified Color.* lookup resolves to undefined and
the bar, launcher, menus, notifications, lock screen and polkit dialog
render without colors (the launcher shows as a black box).

Port of upstream omacom#14553: import qs.Commons as Commons and
reference the palette as Commons.Color.*, keeping the singleton's name so
plugins written against upstream keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dstrbad
dstrbad force-pushed the fix-qt612-color-singleton branch from 619cae4 to 9ad87f1 Compare October 22, 2026 13:11
@dstrbad dstrbad changed the title Rename Color singleton to ThemeColor for Qt 6.12 Qualify shell palette references for Qt 6.12 (port of upstream #14553) Oct 22, 2026
@malik-na malik-na mentioned this pull request Oct 24, 2026
@dstrbad

dstrbad commented Nov 3, 2026

Copy link
Copy Markdown
Author

Heads-up for triage: #765 (4.0.5rc1 sync) already includes this fix. I compared the branches. #765 qualifies every code reference to the palette as Commons.Color, and the only unqualified Color. left in shell/ is in comments and the qmldir declaration, exactly as in this PR. The two branches differ in shell/ only in plugins/lock/Service.qml and plugins/panels/audio/Panel.qml, and neither difference touches Color.

I'll close this once #765 merges. Until then it stays available as a standalone fix in case the sync is held up.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant