Bind breadpad/breadman windows to the current monitor palette
All checks were successful
dev release / build (push) Successful in 9m28s
All checks were successful
dev release / build (push) Successful in 9m28s
Pin bread-theme to v0.7.4.
This commit is contained in:
parent
852a771651
commit
37713eee9e
6 changed files with 434 additions and 521 deletions
941
Cargo.lock
generated
941
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -16,7 +16,7 @@ bread-screenshots = { git = "https://git.breadway.dev/Breadway/bread-ecosystem",
|
||||||
# Shared `--screenshot` pair validation + settle delay (`screenshot_cli`).
|
# Shared `--screenshot` pair validation + settle delay (`screenshot_cli`).
|
||||||
bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.2" }
|
bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.2" }
|
||||||
# `adw` implies `gtk`. Local chip/init shims remain in src/theme_widgets.rs.
|
# `adw` implies `gtk`. Local chip/init shims remain in src/theme_widgets.rs.
|
||||||
bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.2", features = ["adw"] }
|
bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.4", features = ["adw"] }
|
||||||
libadwaita = { version = "0.9", features = ["v1_7"] }
|
libadwaita = { version = "0.9", features = ["v1_7"] }
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -374,6 +374,7 @@ fn build_app_window(
|
||||||
.default_width(960)
|
.default_width(960)
|
||||||
.default_height(640)
|
.default_height(640)
|
||||||
.build();
|
.build();
|
||||||
|
bread_theme::gtk::bind_window_auto(&window);
|
||||||
|
|
||||||
let hbox = gtk4::Box::builder()
|
let hbox = gtk4::Box::builder()
|
||||||
.orientation(gtk4::Orientation::Horizontal)
|
.orientation(gtk4::Orientation::Horizontal)
|
||||||
|
|
@ -616,6 +617,7 @@ fn show_add_note_window(parent: >k4::ApplicationWindow, state: AppState, prese
|
||||||
.modal(true)
|
.modal(true)
|
||||||
.default_width(500)
|
.default_width(500)
|
||||||
.build();
|
.build();
|
||||||
|
bread_theme::gtk::bind_window_auto(&win);
|
||||||
|
|
||||||
let vbox = gtk4::Box::builder()
|
let vbox = gtk4::Box::builder()
|
||||||
.orientation(gtk4::Orientation::Vertical)
|
.orientation(gtk4::Orientation::Vertical)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@ authors.workspace = true
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[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
|
anyhow.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -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`
|
/// Generate the full breadpad/breadman CSS string. The base — `@define-color`
|
||||||
/// palette, fonts, and generic widget styling — comes from the shared
|
/// palette, fonts, and generic widget styling — comes from the shared
|
||||||
/// `bread_theme::stylesheet`, so breadpad and breadman look identical to the
|
/// `bread_theme::stylesheet`, so breadpad and breadman look identical to the
|
||||||
|
|
|
||||||
|
|
@ -451,6 +451,7 @@ fn build_reminder_window(
|
||||||
window.set_layer(Layer::Overlay);
|
window.set_layer(Layer::Overlay);
|
||||||
window.set_keyboard_mode(KeyboardMode::Exclusive);
|
window.set_keyboard_mode(KeyboardMode::Exclusive);
|
||||||
window.auto_exclusive_zone_enable();
|
window.auto_exclusive_zone_enable();
|
||||||
|
breadpad_shared::theme::bind_window(&window);
|
||||||
|
|
||||||
apply_css(&cfg);
|
apply_css(&cfg);
|
||||||
|
|
||||||
|
|
@ -753,6 +754,7 @@ fn build_window(
|
||||||
window.set_anchor(Edge::Bottom, false);
|
window.set_anchor(Edge::Bottom, false);
|
||||||
window.set_anchor(Edge::Left, false);
|
window.set_anchor(Edge::Left, false);
|
||||||
window.set_anchor(Edge::Right, false);
|
window.set_anchor(Edge::Right, false);
|
||||||
|
breadpad_shared::theme::bind_window(&window);
|
||||||
|
|
||||||
apply_css(&cfg);
|
apply_css(&cfg);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue