Implement stable serialization and restoration for dock layouts, including auto-hidden and floating panels

- Add `persistence.rs` for stable serialization of dock layouts without runtime identifiers.
- Introduce `preview.rs` for geometry handling of dock drop previews.
- Create `sizing.rs` to manage content-aware sizing policies and constraint solving for dock panels.
- Implement `welcome.rs` to provide a welcome surface when no documents are open, featuring New and Open actions.
This commit is contained in:
2026-07-16 22:10:22 +03:00
parent 1240d25011
commit b09795ccff
72 changed files with 11898 additions and 3115 deletions
+7 -5
View File
@@ -1,7 +1,9 @@
use image::GenericImageView;
fn main() {
let ref_img = image::open("_images/_psd_stil_test/test_2/Emboss.png").unwrap().to_rgba8();
let ref_img = image::open("_images/_psd_stil_test/test_2/Emboss.png")
.unwrap()
.to_rgba8();
let test_img = image::open("/tmp/test2_Emboss.png").unwrap().to_rgba8();
let mut diff_sum = 0.0;
@@ -15,10 +17,10 @@ fn main() {
let rp = ref_img.get_pixel(x, y);
let tp = test_img.get_pixel(x, y);
let d = (rp[0] as i32 - tp[0] as i32).abs() +
(rp[1] as i32 - tp[1] as i32).abs() +
(rp[2] as i32 - tp[2] as i32).abs() +
(rp[3] as i32 - tp[3] as i32).abs();
let d = (rp[0] as i32 - tp[0] as i32).abs()
+ (rp[1] as i32 - tp[1] as i32).abs()
+ (rp[2] as i32 - tp[2] as i32).abs()
+ (rp[3] as i32 - tp[3] as i32).abs();
diff_sum += d as f64;
max_diff = max_diff.max(d);