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:
@@ -8,12 +8,23 @@ fn main() {
|
||||
}
|
||||
let target_path = PathBuf::from(&args[1]);
|
||||
let actual_path = PathBuf::from(&args[2]);
|
||||
let save_diff = args.iter().position(|a| a == "--save-diff").and_then(|i| args.get(i + 1)).map(PathBuf::from);
|
||||
let save_diff = args
|
||||
.iter()
|
||||
.position(|a| a == "--save-diff")
|
||||
.and_then(|i| args.get(i + 1))
|
||||
.map(PathBuf::from);
|
||||
|
||||
let target = image::open(&target_path).expect("Failed to open target").to_rgba8();
|
||||
let actual = image::open(&actual_path).expect("Failed to open actual").to_rgba8();
|
||||
let target = image::open(&target_path)
|
||||
.expect("Failed to open target")
|
||||
.to_rgba8();
|
||||
let actual = image::open(&actual_path)
|
||||
.expect("Failed to open actual")
|
||||
.to_rgba8();
|
||||
|
||||
let (w, h) = (target.width().min(actual.width()), target.height().min(actual.height()));
|
||||
let (w, h) = (
|
||||
target.width().min(actual.width()),
|
||||
target.height().min(actual.height()),
|
||||
);
|
||||
if w == 0 || h == 0 {
|
||||
eprintln!("One of the images has zero size");
|
||||
std::process::exit(1);
|
||||
|
||||
Reference in New Issue
Block a user