Bind per-output app CSS for breadpad and breadman windows #1

Merged
Breadway merged 1 commit from fix/per-monitor-app-css into main 2026-09-03 13:15:23 +08:00
Owner

theme::bind_window used bind_window_auto, which attaches only the per-output shared sheet. breadpad/breadman component rules resolve @bg/@accent/@blue/... from the display-global @define-color block, so on a monitor whose wallpaper differs those rules kept the session-global palette while shared-sheet widgets followed the output — a mixed palette on non-focused monitors (multi-monitor audit finding #2).

  • theme::bind_window now calls bind_window_auto_with_app_css, rebuilding build_css (with the user style.css override) against the per-output palette; bread-theme inlines the named colours to hex for the bound tree. apply_live stays as the display-level / SIGHUP fallback.
  • breadman called bread_theme::gtk::bind_window_auto directly for its main and add-note windows (main.rs:376,619); both now route through the shared helper.

clippy -D warnings clean; cargo test green (all suites); cargo build --locked unchanged.

`theme::bind_window` used `bind_window_auto`, which attaches only the per-output *shared* sheet. breadpad/breadman component rules resolve `@bg`/`@accent`/`@blue`/... from the display-global `@define-color` block, so on a monitor whose wallpaper differs those rules kept the session-global palette while shared-sheet widgets followed the output — a mixed palette on non-focused monitors (multi-monitor audit finding #2). - `theme::bind_window` now calls `bind_window_auto_with_app_css`, rebuilding `build_css` (with the user `style.css` override) against the per-output palette; bread-theme inlines the named colours to hex for the bound tree. `apply_live` stays as the display-level / SIGHUP fallback. - breadman called `bread_theme::gtk::bind_window_auto` directly for its main and add-note windows (main.rs:376,619); both now route through the shared helper. clippy `-D warnings` clean; `cargo test` green (all suites); `cargo build --locked` unchanged.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/breadpad!1
No description provided.