mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 05:38:13 +08:00
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:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
df74f6f562
commit
904f38fa1b
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user