Add a 'Preserve Aspect Ratio' checkbox to Properties panel (#923)

* Add the link button

* Transform around pivot

* Remove log

* Fix tests

* Add a hacky two-line layout for the checkbox

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2022-12-28 15:21:03 -08:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent df74f6f562
commit 904f38fa1b
8 changed files with 85 additions and 9 deletions
+6
View File
@@ -628,6 +628,12 @@ impl Document {
}
Some(vec![LayerChanged { path: layer_path.clone() }])
}
Operation::SetLayerPreserveAspect { layer_path, preserve_aspect } => {
if let Ok(layer) = self.layer_mut(&layer_path) {
layer.preserve_aspect = preserve_aspect;
}
Some(vec![LayerChanged { path: layer_path.clone() }])
}
Operation::SetTextEditability { path, editable } => {
self.layer_mut(&path)?.as_text_mut()?.editable = editable;
self.mark_as_dirty(&path)?;