Qualify shell palette references for Qt 6.12 (#14553)
This commit is contained in:
1 parent
902fd8aebd
commit
b83d3df084
74 files changed
+381
-293
No files matched your search
+21
-7
@@ -189,6 +189,20 @@ overrides like `omarchy display text size` survive theme switches.
|
||||
|
||||
## Theme tokens
|
||||
|
||||
Shell and plugin QML must qualify the palette singleton because Qt 6.12 introduces its own `Color` type. Import `qs.Commons` with an alias and use `Commons.Color` for palette properties and signal connections:
|
||||
|
||||
```qml
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
|
||||
Rectangle {
|
||||
color: Commons.Color.background
|
||||
}
|
||||
```
|
||||
|
||||
The unqualified import can remain for `Style`, `Util`, and `Border`. Existing third-party plugins that use bare `Color` must make the same change; fixing the host shell does not change a plugin's import scope.
|
||||
|
||||
See [`theming.md`](theming.md) for the full theme/template workflow,
|
||||
including generated `*.tpl` files, gradient helpers, and shell border syntax.
|
||||
|
||||
@@ -200,17 +214,17 @@ or override a single section with `shell.<section>.toml`, merged in by
|
||||
`omarchy-theme-set-templates` (see [`theming.md`](theming.md)).
|
||||
|
||||
`colors.toml` uses `foreground` and `background` for the foundational
|
||||
text/background palette, exposed to QML as `Color.foreground` and
|
||||
`Color.background`.
|
||||
text/background palette, exposed to QML as `Commons.Color.foreground` and
|
||||
`Commons.Color.background`.
|
||||
|
||||
The shell exposes these tokens to QML via three singletons in
|
||||
`qs.Commons`:
|
||||
|
||||
- `Color` — palette (`foreground`, `background`, `accent`, `urgent`)
|
||||
and per-surface roles (`Color.bar.*`, `Color.popups.*`,
|
||||
`Color.tooltip.*`, `Color.notifications.*`, `Color.menu.*`,
|
||||
`Color.polkit.*`, `Color.lock.*`, `Color.imagePicker.*`). Clipboard
|
||||
and emojis share `Color.menu.*`; the `[launcher]` section is consumed
|
||||
and per-surface roles (`Commons.Color.bar.*`, `Commons.Color.popups.*`,
|
||||
`Commons.Color.tooltip.*`, `Commons.Color.notifications.*`, `Commons.Color.menu.*`,
|
||||
`Commons.Color.polkit.*`, `Commons.Color.lock.*`, `Commons.Color.imagePicker.*`). Clipboard
|
||||
and emojis share `Commons.Color.menu.*`; the `[launcher]` section is consumed
|
||||
by the launcher outside shell QML.
|
||||
- `Style` — structural tokens (`cornerRadius`), shared interactive
|
||||
state tokens/helpers, spacing (`Style.spacing.*` / `Style.space(px)`),
|
||||
@@ -218,7 +232,7 @@ The shell exposes these tokens to QML via three singletons in
|
||||
(`Style.bar.sizeHorizontal` / `Style.bar.sizeVertical`).
|
||||
- `Border` — border-spec helpers for QML surfaces. Use with
|
||||
`BorderSurface` from `qs.Ui` when a border should honor shell theme
|
||||
gradients or per-side widths. `Color.<section>.border` is only the
|
||||
gradients or per-side widths. `Commons.Color.<section>.border` is only the
|
||||
flat-color fallback for code that cannot render a real border.
|
||||
|
||||
### Interactive states
|
||||
|
||||
Reference in new issue
Block a user