Bind breadpad/breadman windows to the current monitor palette
All checks were successful
dev release / build (push) Successful in 9m28s

Pin bread-theme to v0.7.4.
This commit is contained in:
Breadway 2026-08-16 13:23:18 +08:00
parent 852a771651
commit 37713eee9e
6 changed files with 434 additions and 521 deletions

View file

@ -7,7 +7,8 @@ authors.workspace = true
[dependencies]
bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.2", features = ["gtk"] }
bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.4", features = ["gtk"] }
gtk4.workspace = true
anyhow.workspace = true
tracing.workspace = true
serde.workspace = true

View file

@ -13,6 +13,11 @@ pub fn apply_live() {
});
}
/// Bind a window to the palette of the monitor it is rendered on.
pub fn bind_window(window: &impl gtk4::prelude::IsA<gtk4::Native>) {
bread_theme::gtk::bind_window_auto(window);
}
/// Generate the full breadpad/breadman CSS string. The base — `@define-color`
/// palette, fonts, and generic widget styling — comes from the shared
/// `bread_theme::stylesheet`, so breadpad and breadman look identical to the