feat(editor): step controls for orientation, crop, look and output size
Owner review 1 asked for the Camera step to frame the picture the way the mockup does, so the step now offers Aspect, Rotation (icon buttons), Mirror and Flip switches, Straighten, Crop size, Crop X and Crop Y, and Reset framing. Cropping by margins is gone: the crop box is now held to the chosen aspect. - EditorSession gains Orient and ResetFraming. Edit and Optimise refit a box that was already held to the aspect whenever the aspect or the export box changes, and do it in the same undo step. A crop from an older project that was placed by offsets is left for the render to fit. - Straighten drives the preview's grid through the new SliderActivity attached behaviour, which a NumberRow switches on with ShowsGrid. - Exposure gains a Look group with Filter and Strength. A newer project's extra look data is kept as it is. - Export: Width and Height now edit the preset's own box, and a new Output size row shows the size after the chosen proportions are applied, marked Capped when the encoder shrinks it. ExportPlan carries OutputSize and EncodedSize. - New SwitchRow, IconActionsRow and GroupRow rows with their panel templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aaf9c0bba7
commit
7413b72ecc
14 files changed
+1030
-100
No files matched your search
@@ -206,6 +206,22 @@ public sealed class EditPathTests
|
||||
"a crop of the whole frame is no crop");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheOrientationAndTheLookReadEdited()
|
||||
{
|
||||
var content = EditorFixture.Content(EditorFixture.Sunset);
|
||||
var project = new ProjectSettings();
|
||||
foreach (var (camera, what) in new[]
|
||||
{
|
||||
(new CameraSettings { Rotate = 90 }, "a quarter turn"), (new CameraSettings { Mirror = true }, "a mirror"),
|
||||
(new CameraSettings { Flip = true }, "a flip"), (new CameraSettings { Straighten = -1.2 }, "a straighten"),
|
||||
})
|
||||
Assert.Equal(Loc.L("Editor.Step.Edited"), State(EditPath.Camera, content, project: project with { Camera = camera }).Text, what);
|
||||
Assert.Equal(Loc.L("Editor.Step.Edited"), State(EditPath.Exposure, content, project: project with { Look = new LookSettings { Filter = "sepia" } }).Text,
|
||||
"a look");
|
||||
Assert.Equal(Loc.L("Common.Auto"), State(EditPath.Exposure, content, project: project with { Look = null }).Text, "no look");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AMissingValueOfASettingThatDoesNotApplyAsksNothing()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user