Skip to content

Fix theme colors on Qt 6.12 - #11

Merged
latentoperator merged 2 commits into
mainfrom
fix/qt612-commons-color
Oct 18, 2026
Merged

latentoperator merged 2 commits into
mainfrom
fix/qt612-commons-color

Conversation

@latentoperator

Copy link
Copy Markdown
Owner

Problem

The Omarchy update on 2026-10-18 moved both desktops to Qt 6.12. Qt 6.12 adds a Color singleton to QtQuick, which shadows the qs.Commons Color palette. Every unqualified Color.* read now returns undefined, so Omamail opens with no theme colours. The shell log on both XPS and BEE shows:

omamail/ui/App.qml[110:3]: Unable to assign [undefined] to QColor
omamail/ui/App.qml[115:-1]: TypeError: Cannot read property 'background' of undefined
omamail/ui/App.qml[116:-1]: TypeError: Cannot read property 'border' of undefined

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-qml and qml-check all exit 0. git diff --check is clean.
  • test-qml gives 1240 passed, 3 failed. All 3 failures are in tst_label_ownership: QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context. The same 3 fail twice in a row on unmodified 3c3d4bf and on upstream v0.11.0. This is a separate pre-existing Qt 6.12 problem, not something this change introduced.
  • No unqualified Color.* reads remain in ui/ or app/.

Release Notes

  • Fix missing theme colours on Qt 6.12.

eliasfaltin and others added 2 commits October 18, 2026 10:40
## 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](https://raw.githubusercontent.com/eliasfaltin/omamail-upstream/0e7595e99738936831c0372680f6766bd34236a4/qt612-before.png)
|
![After](https://raw.githubusercontent.com/eliasfaltin/omamail-upstream/0e7595e99738936831c0372680f6766bd34236a4/qt612-after.png)
|

<!-- 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-popup](https://github.com/user-attachments/assets/cf4ae09e-d4df-4540-b33d-ecf5eaf8baa9)

**AFTER CONTROLS**

![after-controls](https://github.com/user-attachments/assets/21b83dee-0b08-4f62-9642-759c1da2cfba)

**AFTER PLUGIN**

![after-plugin](https://github.com/user-attachments/assets/2fd0f190-d727-4b42-9a80-1bb9ecb025c3)

**AFTER STANDALONE**

![after-standalone](https://github.com/user-attachments/assets/6949823f-4733-441a-9b90-d5259d5fef4d)

**BEFORE CONTROLS POPUP**

![before-controls-popup](https://github.com/user-attachments/assets/9ec4cc2d-9b80-41d0-ac8e-99f735450415)

**BEFORE CONTROLS**

![before-controls](https://github.com/user-attachments/assets/490e2975-6825-4ef8-9d1e-2c371a7ddbc2)

**BEFORE PLUGIN**

![before-plugin](https://github.com/user-attachments/assets/841782bc-3f01-4c65-b570-2065db621b44)

**BEFORE STANDALONE**

![before-standalone](https://github.com/user-attachments/assets/c479ebf0-0ec2-4f84-8183-87b286977278)

---------

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.
@latentoperator
latentoperator merged commit 4f5a45a into main Oct 18, 2026
14 checks passed
@latentoperator
latentoperator deleted the fix/qt612-commons-color branch October 18, 2026 16:05
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.

2 participants