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
@@ -101,9 +101,62 @@
|
||||
<Setter TargetName="NotApplicable" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Slider" Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
<!-- Straighten: while the slider is dragged or focused, the preview shows its fine grid (owner review 1, R6). -->
|
||||
<DataTrigger Binding="{Binding ShowsGrid}" Value="True">
|
||||
<Setter TargetName="Slider" Property="e:SliderActivity.Tracks" Value="True" />
|
||||
<Setter TargetName="Slider" Property="e:SliderActivity.IsActive"
|
||||
Value="{Binding DataContext.Editor.IsStraightening, RelativeSource={RelativeSource AncestorType=ItemsControl}, Mode=OneWayToSource}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- A plain switch (Mirror, Flip): one toggle is one undo step. -->
|
||||
<DataTemplate DataType="{x:Type e:SwitchRow}">
|
||||
<Grid Margin="0,0,0,12" MinHeight="26">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Header}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" ToolTip="{Binding ToolTip}" />
|
||||
<CheckBox Grid.Column="1" Style="{StaticResource CheckBox.Switch}" Margin="8,0,0,0" IsChecked="{Binding IsOn}" VerticalAlignment="Center"
|
||||
ToolTip="{Binding ToolTip}" AutomationProperties.Name="{Binding Header}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Label, value, then 28 px icon-only buttons (Rotation: "90°", Rotate left, Rotate right). -->
|
||||
<DataTemplate DataType="{x:Type e:IconActionsRow}">
|
||||
<Grid Margin="0,0,0,12" MinHeight="28">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Header}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" ToolTip="{Binding ToolTip}" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.RowValue}" Text="{Binding Value}" Margin="8,0,0,0" ToolTip="{Binding ToolTip}" />
|
||||
<ItemsControl Grid.Column="2" ItemsSource="{Binding Actions}" Focusable="False" VerticalAlignment="Center">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type e:IconAction}">
|
||||
<Button Style="{StaticResource Button.Icon}" Width="28" Height="28" MinWidth="28" Margin="6,0,0,0" ui:ButtonIcon.Glyph="{Binding Glyph}"
|
||||
Command="{Binding Command}" ToolTip="{Binding ToolTip}" ToolTipService.ShowOnDisabled="True" AutomationProperties.Name="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- A group inside a step's column (Look on Exposure): a 1 px divider, then its name. -->
|
||||
<DataTemplate DataType="{x:Type e:GroupRow}">
|
||||
<StackPanel Margin="0,2,0,12">
|
||||
<Border Height="1" Background="{DynamicResource Brush.Stroke}" Margin="0,0,0,12" />
|
||||
<TextBlock Text="{Binding Header}" Style="{StaticResource Text.Body}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" ToolTip="{Binding ToolTip}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type e:ChoiceRow}">
|
||||
<Grid Margin="0,0,0,12" MinHeight="32">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -135,18 +188,28 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- ===================== Section frame: title, rows, extra content, Optimise section · Reset ===================== -->
|
||||
<!--
|
||||
===================== Section frame: title, rows, extra content, Optimise section · Reset =====================
|
||||
The ContentControl's Tag is a step's own action, on its line above them (Camera: Reset framing; the three buttons do
|
||||
not fit one line of the 320 px column).
|
||||
-->
|
||||
<ControlTemplate x:Key="Template.SectionPanel" TargetType="ContentControl">
|
||||
<Border Style="{StaticResource Border.EditorPanel}">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{Binding Header}" Style="{StaticResource Text.Section}" Margin="0,0,0,14" />
|
||||
<Grid DockPanel.Dock="Bottom" Margin="0,12,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="{l:Loc Editor.OptimiseSection}" Command="{Binding OptimiseCommand}" ToolTip="{Binding OptimiseToolTip}" ToolTipService.ShowOnDisabled="True" />
|
||||
<Button Grid.Column="1" Style="{StaticResource Button.SectionReset}" Content="{l:Loc Editor.Reset}" Margin="8,0,0,0" Command="{Binding ResetCommand}"
|
||||
<ContentPresenter Grid.ColumnSpan="2" Content="{TemplateBinding Tag}" HorizontalAlignment="Right" Margin="0,0,0,8"
|
||||
Visibility="{TemplateBinding Tag, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
|
||||
<Button Grid.Row="1" Content="{l:Loc Editor.OptimiseSection}" Command="{Binding OptimiseCommand}" ToolTip="{Binding OptimiseToolTip}" ToolTipService.ShowOnDisabled="True" />
|
||||
<Button Grid.Row="1" Grid.Column="1" Style="{StaticResource Button.SectionReset}" Content="{l:Loc Editor.Reset}" Margin="8,0,0,0" Command="{Binding ResetCommand}"
|
||||
ToolTip="{Binding ResetToolTip}" Visibility="{Binding CanReset, Converter={StaticResource BoolToVisibility}}" />
|
||||
</Grid>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Focusable="False">
|
||||
@@ -211,9 +274,13 @@
|
||||
<ContentControl Template="{StaticResource Template.SectionPanel}" Focusable="False" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Camera: rows, then the selected keyframe's framing. -->
|
||||
<!-- Camera: rows (aspect, orientation, crop), then the keyframes and the selected keyframe's framing; Reset framing above Optimise section · Reset. -->
|
||||
<DataTemplate DataType="{x:Type e:CameraTab}">
|
||||
<ContentControl Template="{StaticResource Template.SectionPanel}" Focusable="False">
|
||||
<ContentControl.Tag>
|
||||
<Button Style="{StaticResource Button.SectionReset}" Content="{l:Loc Editor.Camera.ResetFraming}" Command="{Binding ResetFramingCommand}"
|
||||
ToolTip="{Binding ResetFramingToolTip}" ToolTipService.ShowOnDisabled="True" />
|
||||
</ContentControl.Tag>
|
||||
<StackPanel Margin="0,4,0,0">
|
||||
<Grid MinHeight="26" Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -364,6 +431,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.Container}" ToolTip="{l:Loc Editor.Export.Container}" />
|
||||
<ComboBox Grid.Column="1" Margin="0,0,0,8" ItemsSource="{Binding Containers}" SelectedItem="{Binding SelectedContainer}" DisplayMemberPath="Label"
|
||||
@@ -389,8 +457,13 @@
|
||||
<TextBlock Grid.Column="3" Text="{Binding AspectText}" Style="{StaticResource Text.Hint}" FontSize="{StaticResource Size.Secondary}" Margin="6,0,0,0" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="3" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.FrameRate}" ToolTip="{l:Loc Editor.Export.FrameRate}" />
|
||||
<Grid Grid.Row="3" Grid.Column="1" Margin="0,0,0,8">
|
||||
<!-- What is rendered: the chosen proportions fitted in the box above (owner review 1, R5), "(capped)" when the encoder shrinks it. -->
|
||||
<TextBlock Grid.Row="3" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.OutputSize}" ToolTip="{l:Loc Editor.Export.OutputSize}" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Margin="0,0,0,8" MinHeight="24" Style="{StaticResource Text.Number}" Text="{Binding OutputSizeText}"
|
||||
ToolTip="{Binding OutputSizeToolTip}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
|
||||
|
||||
<TextBlock Grid.Row="4" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.FrameRate}" ToolTip="{l:Loc Editor.Export.FrameRate}" />
|
||||
<Grid Grid.Row="4" Grid.Column="1" Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -406,8 +479,8 @@
|
||||
Visibility="{Binding IsFrameRateAuto, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="4" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.Quality}" ToolTip="{l:Loc Editor.Export.Quality}" />
|
||||
<Grid Grid.Row="4" Grid.Column="1" Margin="0,0,0,8" MinHeight="32">
|
||||
<TextBlock Grid.Row="5" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.Quality}" ToolTip="{l:Loc Editor.Export.Quality}" />
|
||||
<Grid Grid.Row="5" Grid.Column="1" Margin="0,0,0,8" MinHeight="32">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="64" />
|
||||
@@ -421,8 +494,8 @@
|
||||
Visibility="{Binding IsQualityApplicable, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="5" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.Encoder}" ToolTip="{l:Loc Editor.Export.Encoder}" />
|
||||
<Grid Grid.Row="5" Grid.Column="1" Margin="0,0,0,8">
|
||||
<TextBlock Grid.Row="6" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.Encoder}" ToolTip="{l:Loc Editor.Export.Encoder}" />
|
||||
<Grid Grid.Row="6" Grid.Column="1" Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -443,18 +516,18 @@
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="6" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.Colour}" ToolTip="{l:Loc Editor.Export.Colour}" />
|
||||
<ComboBox Grid.Row="6" Grid.Column="1" Margin="0,0,0,8" ItemsSource="{Binding Depths}" SelectedItem="{Binding SelectedDepth}" DisplayMemberPath="Label"
|
||||
<TextBlock Grid.Row="7" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.Colour}" ToolTip="{l:Loc Editor.Export.Colour}" />
|
||||
<ComboBox Grid.Row="7" Grid.Column="1" Margin="0,0,0,8" ItemsSource="{Binding Depths}" SelectedItem="{Binding SelectedDepth}" DisplayMemberPath="Label"
|
||||
IsEnabled="{Binding CanChooseDepth}" ToolTip="{l:Loc Tooltips.Editor.Export.Colour}" ToolTipService.ShowOnDisabled="True"
|
||||
AutomationProperties.Name="{l:Loc Editor.Export.Colour}" />
|
||||
|
||||
<TextBlock Grid.Row="7" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.FileName}" ToolTip="{l:Loc Editor.Export.FileName}" />
|
||||
<TextBox Grid.Row="7" Grid.Column="1" Margin="0,0,0,8" Text="{Binding NameTemplate.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
<TextBlock Grid.Row="8" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.FileName}" ToolTip="{l:Loc Editor.Export.FileName}" />
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Margin="0,0,0,8" Text="{Binding NameTemplate.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
shell:EditBehavior.Field="{Binding NameTemplate}" ToolTip="{Binding NameTemplate.ToolTip}" AutomationProperties.Name="{l:Loc Editor.Export.FileName}" />
|
||||
|
||||
<TextBlock Grid.Row="8" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.SaveTo}" ToolTip="{l:Loc Editor.Export.SaveTo}" />
|
||||
<TextBlock Grid.Row="9" Style="{StaticResource Text.Label}" Text="{l:Loc Editor.Export.SaveTo}" ToolTip="{l:Loc Editor.Export.SaveTo}" />
|
||||
<!-- The folder ends in an ellipsis (its full path is in the tooltip). -->
|
||||
<ComboBox Grid.Row="8" Grid.Column="1" ItemsSource="{Binding SaveChoices}" SelectedItem="{Binding SelectedSave}" IsEnabled="{Binding CanChooseFolder}"
|
||||
<ComboBox Grid.Row="9" Grid.Column="1" ItemsSource="{Binding SaveChoices}" SelectedItem="{Binding SelectedSave}" IsEnabled="{Binding CanChooseFolder}"
|
||||
ToolTip="{Binding SaveToolTip}" ToolTipService.ShowOnDisabled="True" AutomationProperties.Name="{l:Loc Editor.Export.SaveTo}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type e:SaveChoice}">
|
||||
@@ -464,7 +537,7 @@
|
||||
</ComboBox>
|
||||
<!-- Export.html "Sync" (12 px): also send the render to the server the sequence is linked to. Under the folder rather than beside
|
||||
it, as in the mockup, so that neither is cut in the 194 px field column in longer languages. -->
|
||||
<CheckBox Grid.Row="9" Grid.Column="1" Margin="0,6,0,0" HorizontalAlignment="Left" FontSize="{StaticResource Size.Secondary}"
|
||||
<CheckBox Grid.Row="10" Grid.Column="1" Margin="0,6,0,0" HorizontalAlignment="Left" FontSize="{StaticResource Size.Secondary}"
|
||||
Content="{l:Loc Editor.Export.Sync}" IsChecked="{Binding SyncToServer}" IsEnabled="{Binding CanSync}" ToolTip="{Binding SyncToolTip}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
</Grid>
|
||||
|
||||
Reference in new issue
Block a user