LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Top bar: repin craft-window to craft-libs 4093ea4; the title bar is announced from empty_area's response
aiongg19ab8214779e
diff --git a/Cargo.lock b/Cargo.lockindex 7b7dbfb41..6d9311c48 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1098,7 +1098,7 @@ dependencies = [[[package]]name = "craft-window"version = "0.1.0"-source = "git+https://github.com/storytold/craft-libs?rev=8177bad411b577f3204deb0a0e074516d76a0b93#8177bad411b577f3204deb0a0e074516d76a0b93"+source = "git+https://github.com/storytold/craft-libs?rev=4093ea468c6691a0498849ff11683c5243d56272#4093ea468c6691a0498849ff11683c5243d56272"dependencies = ["egui","objc2 0.6.4",@@ -1684,7 +1684,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"dependencies = ["libc",- "windows-sys 0.61.2",+ "windows-sys 0.52.0",][[package]]@@ -3764,7 +3764,7 @@ dependencies = ["once_cell","png","thiserror 2.0.21",- "windows-sys 0.61.2",+ "windows-sys 0.60.2",][[package]]@@ -5270,7 +5270,7 @@ dependencies = ["errno","libc","linux-raw-sys 0.12.1",- "windows-sys 0.61.2",+ "windows-sys 0.52.0",][[package]]@@ -5804,7 +5804,7 @@ dependencies = ["getrandom 0.4.3","once_cell","rustix 1.1.5",- "windows-sys 0.61.2",+ "windows-sys 0.52.0",][[package]]@@ -6003,7 +6003,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"dependencies = ["memoffset","tempfile",- "windows-sys 0.61.2",+ "windows-sys 0.60.2",][[package]]@@ -6591,7 +6591,7 @@ version = "0.1.11"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"dependencies = [- "windows-sys 0.61.2",+ "windows-sys 0.52.0",][[package]]diff --git a/Cargo.toml b/Cargo.tomlindex b641f471a..712ea59d6 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -12,7 +12,7 @@ repository = "https://github.com/storytold/lightcraft"[workspace.dependencies]craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "5c874d51eeb3de70e735c8ce87a59a7dedd47675", features = ["serde"] }craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "82a24b006eefa036b43c09a67fb9a3fbd17ffe63" }-craft-window = { git = "https://github.com/storytold/craft-libs", rev = "8177bad411b577f3204deb0a0e074516d76a0b93", features = ["egui"] }+craft-window = { git = "https://github.com/storytold/craft-libs", rev = "4093ea468c6691a0498849ff11683c5243d56272", features = ["egui"] }# internallightcraft-denoise-core = { path = "crates/denoise-core" }lightcraft-denoise = { path = "crates/denoise", default-features = false }diff --git a/crates/ui-egui/src/panels/topbar.rs b/crates/ui-egui/src/panels/topbar.rsindex 7d1cf6530..acee425ed 100644--- a/crates/ui-egui/src/panels/topbar.rs+++ b/crates/ui-egui/src/panels/topbar.rs@@ -12,11 +12,8 @@ use crate::widgets::{icon_button, register};/// double-click acts as the system setting says. Made before the bar's widgets so they win the click.fn window_handle(ui: &mut egui::Ui, bar: Rect) {register(ui.ctx(), "region:titlebar", bar);- craft_window::title_bar::empty_area(ui, bar);- // (the empty area is the widget `empty_area` makes under this id)- if let Some(resp) = ui.ctx().read_response(ui.id().with("title_bar_empty")) {- crate::widgets::announce(&resp, crate::i18n::tr("Title bar"));- }+ let resp = craft_window::title_bar::empty_area(ui, bar);+ crate::widgets::announce(&resp, crate::i18n::tr("Title bar"));}pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {