Skip to content

Qt 6.12: bare Color. references are shadowed by QtQuick's built-in Color singleton — history panel renders unthemed #6

Open

Description

@Stegi56

Summary

On Qt 6.12 every bare Color.… reference in this plugin resolves to QtQuick's new built-in Color singleton (QQuickColor) instead of Omarchy's qs.Commons Color singleton. Every theme-derived colour evaluates to undefined, so the clipboard history panel renders unthemed.

Omarchy fixed this in its own shell by qualifying every palette reference as Commons.Color. (omacom/omarchy#14553). Code outside /usr/share/omarchy did not get that change; omacom/omarchy#14672 tracks the gap for third-party plugins.

Environment

  • Omarchy 4.0.4
  • qt6-base 6.12.0-3, qt6-declarative 6.12.0-1
  • quickshell 0.3.2-1
  • Hyprland 0.56.2-4
  • clipbasket.clipboard 1.0.0

Root cause

Qt 6.12 added a built-in Color namespace to QtQuick. It takes precedence over a singleton of the same name imported via import qs.Commons, so the singleton is shadowed. Verified in isolation on this machine:

BARE   typeof Color        = object
BARE   Color.foreground    = undefined
BARE   Color.popups        = undefined
QUAL   Commons.Color.fg    = #cacccc
QUAL   Commons.Color.popups= QObject_QML_12(0x…)

Object.keys(Color) returns ["objectName","objectNameChanged","rgba","hsla","hsva","fromString","equal","transparent","blend","darker","lighter","tint"] — i.e. Qt's QQuickColor, not the palette.

Because these values are undefined and never change, the failing bindings throw once at component creation and are never re-evaluated, so the breakage is permanent for the life of the shell process.

Affected files

File Bare Color. refs Lines
Panel.qml 8 1509, 1843, 2137, 2173, 2285, 2340, 2585, 2921

Observed

30 QML warnings from this plugin in a single day's normal use:

clipbasket.clipboard/Panel.qml[1843:19]: Unable to assign [undefined] to QColor
clipbasket.clipboard/Panel.qml[2921:19]: Unable to assign [undefined] to QColor

Steps to reproduce

  1. Arch with qt6-declarative 6.12.0 and quickshell 0.3.2, on Omarchy 4.0.4.
  2. omarchy plugin enable clipbasket.clipboard && omarchy-restart-shell
  3. Open the basket from the bar and copy a few items so the history rows populate.
  4. journalctl --user -f | grep clipbasket

Expected: the history rows and panel chrome render in the active theme.
Actual: theme-derived colours are undefined, so those elements render unthemed; the log shows the errors above.

Fix

Add import qs.Commons as Commons and qualify every bare Color. as Commons.Color. — matching what the Omarchy shell itself now does: 131 qualified references, zero bare.

I applied exactly that locally across the 8 references above. The panel renders correctly again and the plugin emits zero QML warnings.


Claude Opus 5 on behalf of Joel Staugaitis, close if AI written issues are not acceptable

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions