Files
qbz/crates/qbz-ui/ui/foundation/palette.slint
T
vicrodh c8ef2a1b1d refactor(slint): split qbz-slint into qbz-ui lib + qbz bin; reclaim qbz binary
Slint cannot split the .slint compilation across crates, but a Slint LIBRARY
crate exposes its generated Rust types to dependent crates (verified with a
minimal proof). So:

- NEW crate `qbz-ui` (lib): owns the whole .slint tree + build.rs + bundled
  translations; `slint::include_modules!()` + the generated types (AppWindow,
  MiniPlayerWindow, all globals/structs) are re-exported. Translation domain is
  now `qbz-ui` (the .po files renamed accordingly).
- `qbz-slint` (bin) -> renamed to `qbz` (package + `[[bin]] name = "qbz"`),
  reclaiming the binary name from the retired Tauri app. It depends on `qbz-ui`
  and does `pub use qbz_ui::*;` so existing `crate::AppWindow` / `crate::*State`
  references resolve unchanged.

This splits the single ~20 GB rustc into two crates (UI/codegen vs the 75k LOC
of logic) — the foundation for lower build peak, incremental caching, and the
upcoming per-feature crate extraction.

Also fixed for the move: qbz-i18n bundled-.po include paths, the font/WGSL
`include_bytes!`/`include_str!` paths (-> ../../qbz-ui/ui/), workspace members,
dev scripts (`-p qbz`), and the CI workflows. `cargo check -p qbz` is green.

cc
2026-06-25 17:51:09 -06:00

30 lines
1.3 KiB
Plaintext

// Raw palette — the only place hex colors are allowed to be literals.
// Mirrors the QBZ dark theme defined in `src/app.css`. Feature and shell
// components must never reference this directly; they consume semantic
// tokens from `semantic-colors.slint` instead.
export global Palette {
out property <color> black-0: #0f0f0f; // --bg-primary
out property <color> black-1: #1a1a1a; // --bg-secondary
out property <color> black-2: #2a2a2a; // --bg-tertiary
out property <color> hover-1: #1f1f1f; // --bg-hover
out property <color> white: #ffffff; // --text-primary
out property <color> gray-c: #cccccc; // --text-secondary
out property <color> gray-8: #888888; // --text-muted
out property <color> gray-5: #555555; // --text-disabled
out property <color> blue: #4285f4; // --accent-primary
out property <color> blue-hover: #5a9bf4;// --accent-hover
out property <color> blue-active: #3275e4;// --accent-active
out property <color> danger: #ef4444;
out property <color> warning: #fbbf24;
out property <color> shadow: #00000066; // rgba(0,0,0,0.4)
out property <color> alpha-6: #ffffff10; // ~6% white — hover fills
out property <color> alpha-8: #ffffff14; // ~8% white — hairline borders
out property <color> alpha-strong: #ffffff38; // ~22% white — defined edges
}