Skip to content

fix(ui): qualify the palette as Commons.Color under Qt 6.12 - #276

Merged
thisisgm merged 1 commit into
thisisgm:mainfrom
jfg96:fix/qt612-commons-color
Oct 11, 2026
Merged

thisisgm merged 1 commit into
thisisgm:mainfrom
jfg96:fix/qt612-commons-color

Conversation

@jfg96

@jfg96 jfg96 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

On Qt 6.12 the main window is unusable: its text draws black on black.

qt6-declarative 6.12 adds a Color singleton to QtQuick. Where a file imports both QtQuick and qs.Commons unqualified, that singleton shadows qs.Commons' Color, so the palette reads undefined: the window draws text black on black and only control frames show. Omarchy hit the same thing in its shell and fixed it the same way (omacom/omarchy#14553, omacom/omarchy#14626).

The nine files that read the palette (ui/Theme.qml and eight shelf/ files) now import qs.Commons as Commons beside the existing plain import, which still supplies Style and Border, and say Commons.Color. Comments are unchanged. Color is the only name qs.Commons exports that any installed QML module also exports.

The extra import line moves three recorded ceilings by one (ui/Theme.qml 434, shelf/Panel.qml 431, shelf/ShelfCard.qml 444), noted in AGENTS.md. tests/staticgates-unqualified.tsv moves the ui/Theme.qml rows below the import down one line in both profiles and names Commons where it named Color. tests/js/themes.js pins the new Contrast.ensureRatio(Commons.Color.urgent, …) text.

Validation on Qt 6.12.0 with the quickshell-present profile:

  • Before this change, tests/staticgates.py already fails on main with 24 stale Color allowances in ui/Theme.qml, because qmllint now resolves Color to QtQuick's singleton. With it, STATICGATES PASS gates=7.
  • tools/flea-file-budget passes.
  • The PKGBUILD check() passes: cargo test --locked (1,570 tests), ./tests/js.sh (11,267 checks plus Edmonton and DST) and ./tests/keymap-gen.sh.
  • tests/shellload.sh passes (5 checks).
  • The patched ui/ and shelf/ were installed over flea-bin 0.3.8 and the window draws its theme again.

I could not check the quickshell-missing profile rows locally.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed a color palette compatibility issue that could affect popup, shelf, and theme colors in Qt 6.12. Existing color choices and contrast behavior are unchanged.

Qt 6.12 adds a Color singleton to QtQuick that shadows the one in
qs.Commons, so the palette read undefined and text drew black on black.
The nine files that read it now import qs.Commons as Commons.
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2fb3e7ac-7ba4-4f4b-a393-db72c397a2be
📥 Commits

Reviewing files that changed from the base of the PR and between abb536e and 7b76605.

⛔ Files ignored due to path filters (1)
  • tests/staticgates-unqualified.tsv is excluded by !**/*.tsv
📒 Files selected for processing (12)
  • AGENTS.md
  • shelf/Panel.qml
  • shelf/ShelfActionButton.qml
  • shelf/ShelfCard.qml
  • shelf/ShelfCheck.qml
  • shelf/ShelfFlyout.qml
  • shelf/ShelfMenu.qml
  • shelf/ShelfRail.qml
  • shelf/ShelfRun.qml
  • tests/js/themes.js
  • tools/flea-file-budget
  • ui/Theme.qml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change qualifies qs.Commons.Color references with the Commons alias in Theme.qml and shelf components. It also updates a source assertion, recorded file ceilings, and a repository note.

Changes

Color Namespace Qualification

Layer / File(s) Summary
Theme color resolution
ui/Theme.qml, tests/js/themes.js, tools/flea-file-budget
Theme color initialization, palette loading, and shell-theme loading now use Commons.Color. The source assertion and Theme.qml line ceiling are updated.
Shelf color references
shelf/*.qml, AGENTS.md, tools/flea-file-budget
Shelf components now import qs.Commons as Commons and use qualified color references. The repository note and shelf file ceilings are updated.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: thisisgm

Merge Risk: ⚪ Minimal · up to 7b766

Palette accesses now explicitly target Commons.Color across the changed QML files, while existing Style and Border access remains intact. No actionable merge-blocking regression is established.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (11 skipped: 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: qualifying palette references as Commons.Color to fix Qt 6.12 compatibility.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stevederico

Copy link
Copy Markdown

Confirmed on Flea 0.3.8 (abb536e) with qt6-declarative 6.12.0-1. Omarchy, Hyprland.

The active theme is stock. Its colors.toml matches the packaged ethereal theme. The file list stayed black. Startup log:

TypeError: Property 'loadColors' of object QQuickColor(...) is not a function
TypeError: Property 'loadShell' of object QQuickColor(...) is not a function
Unable to assign [undefined] to QColor

Qualifying Color the way this pull request does loads the palette. themeLoaded is true and the rows draw in the theme colors.

thisisgm added a commit that referenced this pull request Oct 11, 2026
Qt 6.12's QtQuick Color singleton shadows qs.Commons' Color, as PR #276
fixed in ui/ and shelf/. The commons-color gate keeps every tree on
Commons.Color, including optional and subscript reads.
@thisisgm
thisisgm merged commit daf1ffa into thisisgm:main Oct 11, 2026
1 check passed
@thisisgm

Copy link
Copy Markdown
Owner

Merged in v0.3.9: under Qt 6.12, QtQuick's Color type hid the Omarchy palette, and this PR qualifies it as Commons.Color (7b76605). Thanks @jfg96! https://github.com/thisisgm/flea/releases/tag/v0.3.9

@jfg96
jfg96 deleted the fix/qt612-commons-color branch October 11, 2026 15:03
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.

3 participants