Skip to content

fix: qualify Color as Commons.Color for Qt 6.12 - #3

Open
Stegi56 wants to merge 1 commit into
Davedes83:masterfrom
Stegi56:fix/qt612-commons-color
Open

Stegi56 wants to merge 1 commit into
Davedes83:masterfrom
Stegi56:fix/qt612-commons-color

Conversation

@Stegi56

@Stegi56 Stegi56 commented Oct 17, 2026

Copy link
Copy Markdown

Fixes #2

Problem

Qt 6.12 (qt6-declarative 6.12.0) adds a built-in QML Color singleton (QQuickColor) that shadows the Color singleton imported from qs.Commons. Every bare Color.<x> in OmaControl therefore evaluates to undefined, and the theme bindings in AppWindow.qml throw once at creation and are never re-evaluated. The result is that the app window renders as a black void (no background, borders, scrim, tab chrome or text), the tooltip and bar bell lose their themed colours, and the journal fills with Unable to assign [undefined] to QColor / Cannot read property 'scrim' of undefined warnings. See #2 for the full analysis.

Fix

Same change Omarchy made to its own shell in omacom/omarchy#14553: import qs.Commons under the Commons qualifier and reference the palette as Commons.Color.<x>.

  • AppWindow.qml — 22 references
  • BarWidget.qml — 5 references

No other changes. Comments that mention Color are left as they are, and Model.js doesn't read the singleton.

This is backward compatible: on Qt ≤ 6.11 Commons.Color resolves to the same singleton as bare Color did.

Screenshots

Omarchy 4.0.4, qt6-declarative 6.12.0, quickshell 0.3.2; before = the current default branch, after = this branch; shell restarted between states. The first pair is the app window opened with openApp; the second is the bar strip while the app is open.

Before After

The app window: before, it is almost entirely black and only "CPU 10.4%" and "1h" are visible; after, it renders fully.

Before After

The bar strip while the app is open: before, it turns white; after, it looks normal.

Testing

  • Live check in a VM: each state loaded after omarchy-restart-shell, the app window opened, and the QML warnings from this plugin counted in the journal: 15 before → 0 after.
  • tests/check-brackets.py passes.
  • The committed AppWindow.qml and BarWidget.qml are byte-identical to the copies verified live in the VM.
  • tests/run-tests.sh (the shell suites) was not run. This change only touches the two QML files, and those suites test the shell scripts.

Claude Opus 5.5 on behalf of Joel Staugaitis, close if AI written PRs are not acceptable

🤖 Generated with Claude Code

Qt 6.12 adds a built-in QML Color singleton to QtQuick that shadows the
Color singleton imported from qs.Commons. Every bare Color.<role> then
resolves to undefined, so the app window and bar widget lose their
theme colours and the shell logs a TypeError per binding.

Import qs.Commons under the Commons qualifier and read the palette as
Commons.Color.<role>, matching the change Omarchy made to its own shell
in omacom/omarchy#14553. The qualified form resolves to the same
singleton on Qt 6.11 and earlier.

Fixes Davedes83#2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Qt 6.12: bare Color. references are shadowed by QtQuick's built-in Color singleton — app window renders black/unthemed

1 participant