Repository navigation
Fix theme colors on Qt 6.12 - #11
Merged
Merged
Conversation
## Problem Qt 6.12 adds a `Color` type to the `QtQuick` module. It shadows the `Color` palette singleton from `qs.Commons`. Every unqualified `Color.*` read now returns `undefined`, so the plugin and the standalone app render with no theme colours. The shell log shows the fault on Qt 6.12.0: ``` omamail/ui/BarWidget.qml[116:11]: Unable to assign [undefined] to QColor omamail/ui/BarWidget.qml[179:-1]: TypeError: Cannot read property 'text' of undefined omamail/ui/components/GmailIcon.qml[105:-1]: TypeError: Cannot read property 'background' of undefined ``` ## Fix Each file that reads the palette now imports `qs.Commons as Commons` and uses `Commons.Color`, including `target: Commons.Color` in `app/qml/Main.qml`. This is the rule Omarchy applies to its own shell in omacom/omarchy#14553. The unqualified `qs.Commons` import stays for `Style`, `Border`, and `Util`. The change covers `ui/`, the standalone `app/qml/` host and its `qs.Commons`/`qs.Ui` modules, and the QML tests. `tests/test_source.sh` now looks for `markColor: Commons.Color.accent`. The alias import works on every Qt 6 version, so Qt 6.11 keeps working. The palette fix exposed one older bug, fixed in `3baf5f7`. In `app/qml/styles/Omamail/ComboBox.qml`, `parent` in the chevron's `Connections` handler resolves to the ComboBox, not the `Canvas`. Each palette change raised `requestPaint is not a function` and left the chevron in its old colour. The handler now calls the Canvas by id. ## Qt 6.12 theme evidence Standalone app (`make app-build`) on Arch, Qt 6.12.0, Omarchy theme, empty profile (setup page). Before: `main` at `a528507`; the app log has 1155 `undefined`/`TypeError` lines. After: PR head `3baf5f7`; the log has none. <!-- before-and-after:start --> | Before (Standalone app, setup page) | After (Standalone app, setup page) | |:---:|:---:| |  |  | <!-- before-and-after:end --> ## Verification On Arch with Qt 6.12.0: - Synced with `main` at `a528507` (merge commit `e5c17bd`); head is `3baf5f7`. On that head: `make test-qml` 1155 passed, 3 failed (the same `LabelOwnership` failures as `main`); `make test-app-qml` passes; `bash tests/test_source.sh` passes. - `grep` finds no unqualified `Color` reference left in `ui/` or `app/` QML. The remaining matches are a string literal and a comment. - `make test-qml`: 1154 passed, 4 failed before; 1155 passed, 3 failed after. `NotificationOpen::test_new_notifications_follow_theme_without_bar_foreground` fails before and passes after. The 3 `LabelOwnership` failures (`reloadLabels is not a function`) fail the same way on `main` and are unrelated. - `make test-app-qml`: `tst_standalone_composition` failed 2 of 30 before (palette compares returned `undefined`) and passes after. - `bash tests/test_source.sh` passes. ## Release Notes - Restore theme colors in the plugin and standalone app on Qt 6.12. ## Maintainer supplemental screenshot evidence Matching before/after captures cover shared plugin components (bar icon, unread badge, action icons, default and selected buttons; text, number and toggle controls; dropdown closed and open) and the standalone provider picker, using the active Omarchy palette at scale 1 on Qt 6.11.2. Appearance is intentionally identical on this runtime: these captures demonstrate preservation of Qt 6.11 appearance, not the Qt 6.12 broken/restored state. Independent Qt 6.12 runtime screenshots remain unavailable; the author reports that regression separately. Synthetic data and production component source are used. After captures include the author’s `3baf5f7` Canvas repaint fix and match the affected widget and theme code in final head `dacd864`; the final integration also includes unrelated MessageMenu updates, so equivalence of the whole UI tree is not claimed. The open-dropdown screenshots are matching 313×56 crops of the actual expanded popup content; the plugin and standalone screenshots show matching full-window views. A separate native SignalSpy regression covers chevron repaint when the theme changes; these screenshots do not substitute for that assertion. **AFTER CONTROLS POPUP**  **AFTER CONTROLS**  **AFTER PLUGIN**  **AFTER STANDALONE**  **BEFORE CONTROLS POPUP**  **BEFORE CONTROLS**  **BEFORE PLUGIN**  **BEFORE STANDALONE**  --------- Co-authored-by: Jason Lee <huacnlee@gmail.com> (cherry picked from commit b0504b9)
Qt 6.12 adds a QtQuick Color singleton that shadows qs.Commons Color. The cherry-picked upstream fix (b0504b9) qualifies every palette read it knew about; EmlSavedToast arrived in this repository via PR #10 and kept two unqualified fallbacks, which would read undefined whenever the card is constructed without its app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Omarchy update on 2026-10-18 moved both desktops to Qt 6.12. Qt 6.12 adds a
Colorsingleton toQtQuick, which shadows theqs.CommonsColorpalette. Every unqualifiedColor.*read now returnsundefined, so Omamail opens with no theme colours. The shell log on both XPS and BEE shows:Fix
b0504b9("Fix theme colors on Qt 6.12", Fix theme colors on Qt 6.12 huacnlee/omamail#346, shipped in v0.11.0) with-x. It applied with no conflicts.EmlSavedToast.qml, which came in through PR Add saved-file toast, reader entry points, and folder choice for Save as .eml #10 and so were missed by the upstream fix.This is not the full v0.11.0 sync. That sync stays deferred until huacnlee/omamail#324 is decided.
Verification
On XPS (Qt 6.12.0, quickshell 0.3.2.r7), offscreen:
test-js,test-shell,test-app-qmlandqml-checkall exit 0.git diff --checkis clean.test-qmlgives 1240 passed, 3 failed. All 3 failures are intst_label_ownership:QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context. The same 3 fail twice in a row on unmodified3c3d4bfand on upstreamv0.11.0. This is a separate pre-existing Qt 6.12 problem, not something this change introduced.Color.*reads remain inui/orapp/.Release Notes