- Undo/redo snapshots take outside changes (advice, merged edits) on Replace; a drag, click or key press ends a merged run; Reset to Auto is its own step. - A failed save stays pending and is retried with backoff; closing or switching asks before discarding it; the local source throws unless the index took it. - Opening a sequence survives any failure; the window title follows the editor; the job bar hides when idle in the editor. - Render, Add to queue and Batch re-read their state; disabled commands say why; Analyse is disabled while queued and announces its cost and Ctrl+Shift+A. - Preview: 1:1 and wheel zoom render the source's own pixels, the view keeps its place across resolutions, crop mask result mode, unreadable frames say so, labelled tools, keyboard focus on open, tools hidden on Export lose their effect. - Preparation re-solves from measured series (no re-decode per slider step) with a half-precision frame cache. - Exposure flicker and waveform charts, Time plan chart, Camera crop margins, sortable frame table, wrapped findings, responsive preset cards, render-done follow-up, Jobs history filtered on the sequence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
174 lines
13 KiB
XML
174 lines
13 KiB
XML
<UserControl x:Class="Titano.App.Sections.SequenceView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
|
|
xmlns:v="clr-namespace:Titano.Ui.Visuals;assembly=Titano.Ui"
|
|
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
|
|
KeyDown="OnKeyDown" Loaded="OnLoaded">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/Titano;component/Editor/EditorStyles.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<ui:EmptyState Message="{l:Loc Editor.Empty}" Visibility="{Binding IsEmpty, Converter={StaticResource BoolToVisibility}}">
|
|
<Button Style="{StaticResource Button.Primary}" Content="{l:Loc Shell.Nav.Library}" Command="{Binding OpenLibraryCommand}" ToolTip="{l:Loc Tooltips.Nav.Library}" />
|
|
</ui:EmptyState>
|
|
<ProgressBar Width="240" IsIndeterminate="True" VerticalAlignment="Center" Visibility="{Binding IsLoading, Converter={StaticResource BoolToVisibility}}"
|
|
AutomationProperties.Name="{l:Loc Editor.Loading}" />
|
|
|
|
<!-- Editor.html: header, then the preview, filmstrip and section tabs on the left and the section's settings on the right. -->
|
|
<Grid x:Name="EditorRoot" DataContext="{Binding Editor}" Margin="16,0,16,12" IsVisibleChanged="OnEditorVisibleChanged"
|
|
Visibility="{Binding Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
|
|
<Grid.InputBindings>
|
|
<KeyBinding Key="Z" Modifiers="Control" Command="{Binding UndoCommand}" />
|
|
<KeyBinding Key="Y" Modifiers="Control" Command="{Binding RedoCommand}" />
|
|
<KeyBinding Key="D0" Modifiers="Control" Command="{Binding FitCommand}" />
|
|
<KeyBinding Key="D1" Modifiers="Control" Command="{Binding ActualSizeCommand}" />
|
|
<KeyBinding Key="R" Modifiers="Control" Command="{Binding RenderCommand}" />
|
|
<KeyBinding Key="A" Modifiers="Control+Shift" Command="{Binding AnalyseCommand}" />
|
|
</Grid.InputBindings>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="52" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button Style="{StaticResource Button.IconSubtle}" ui:ButtonIcon.Glyph="{StaticResource Icon.Back}" Command="{Binding BackCommand}"
|
|
ToolTip="{l:Loc Tooltips.Editor.Back}" AutomationProperties.Name="{l:Loc Editor.Back}" Margin="-6,0,0,0" />
|
|
<TextBlock Grid.Column="1" Text="{Binding Title}" Style="{StaticResource Text.Title}" VerticalAlignment="Center" Margin="6,0,12,0" MaxWidth="320"
|
|
TextTrimming="CharacterEllipsis" />
|
|
<TextBlock Grid.Column="2" Text="{Binding Summary}" Style="{StaticResource Text.Secondary}" FontSize="{StaticResource Size.Body}" VerticalAlignment="Center"
|
|
TextTrimming="CharacterEllipsis" Typography.NumeralAlignment="Tabular" ToolTip="{Binding Summary}" />
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="12,0,0,0">
|
|
<Button Content="{l:Loc Editor.Analyse}" Command="{Binding AnalyseCommand}" ToolTip="{Binding AnalyseToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
<Button Content="{l:Loc Editor.OptimiseAll}" Command="{Binding OptimiseAllCommand}" ToolTip="{Binding OptimiseAllToolTip}"
|
|
ToolTipService.ShowOnDisabled="True" Margin="12,0,0,0" />
|
|
<v:SplitButton x:Name="RenderButton" IsPrimary="True" Margin="12,0,0,0" Content="{Binding RenderText}" Command="{Binding RenderCommand}"
|
|
ItemsSource="{Binding RenderChoices}" DisplayMemberPath="Label" SelectedItem="{Binding SelectedRenderChoice}" ToolTip="{Binding RenderToolTip}"
|
|
ToolTipService.ShowOnDisabled="True" DropDownToolTip="{l:Loc Tooltips.Editor.RenderChoice}"
|
|
AutomationProperties.Name="{l:Loc Editor.RenderButton}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="{StaticResource Editor.Grid.Panel}" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Margin="0,0,16,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition MinHeight="160">
|
|
<RowDefinition.Style>
|
|
<Style TargetType="RowDefinition">
|
|
<Setter Property="Height" Value="{StaticResource Editor.Grid.Preview}" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsExportTab}" Value="True">
|
|
<Setter Property="Height" Value="{StaticResource Editor.Grid.ExportPreview}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</RowDefinition.Style>
|
|
</RowDefinition>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition MinHeight="150">
|
|
<RowDefinition.Style>
|
|
<Style TargetType="RowDefinition">
|
|
<Setter Property="Height" Value="{StaticResource Editor.Grid.Measure}" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsExportTab}" Value="True">
|
|
<Setter Property="Height" Value="{StaticResource Editor.Grid.ExportMeasure}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</RowDefinition.Style>
|
|
</RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
|
|
<v:PreviewViewport x:Name="Preview" Source="{Binding PreviewImage}" OriginalSource="{Binding OriginalImage}" IsCompareEnabled="{Binding IsCompare}"
|
|
WipeLabel="{Binding WipeLabel}" ZoomMode="{Binding ZoomMode, Mode=TwoWay}" ShowVectors="{Binding ViewVectors}"
|
|
MotionVectors="{Binding MotionVectors}" VectorScale="{Binding VectorScale}" ShowRegions="{Binding ViewRegions}"
|
|
RegionBoundary="{Binding RegionBoundary}" ShowCropMask="{Binding ShowCropMask}" CropRect="{Binding CropRect}"
|
|
CropMaskMode="{Binding CropMaskMode}" InfoText="{Binding InfoText}" ToolTip="{l:Loc Tooltips.Editor.Preview.View}"
|
|
AutomationProperties.Name="{l:Loc Editor.Preview}" SizeChanged="OnPreviewSizeChanged">
|
|
<v:PreviewViewport.ToolsContent>
|
|
<!-- Tools give the keyboard back to the preview after a click, so Space keeps playing (OnToolClicked). -->
|
|
<StackPanel Orientation="Horizontal" DataContext="{Binding DataContext, ElementName=EditorRoot}" ButtonBase.Click="OnToolClicked">
|
|
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="{Binding IsCompare}" ui:ButtonIcon.Glyph="{StaticResource Icon.Compare}"
|
|
Content="{l:Loc Editor.Preview.Compare}" ToolTip="{l:Loc Tooltips.Editor.Preview.Compare}" />
|
|
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
|
|
IsChecked="{Binding ShowVectors}" ui:ButtonIcon.Glyph="{StaticResource Icon.Vectors}" Content="{l:Loc Editor.Preview.Vectors}"
|
|
ToolTip="{l:Loc Tooltips.Editor.Preview.Vectors}" />
|
|
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
|
|
IsChecked="{Binding ShowRegions}" ui:ButtonIcon.Glyph="{StaticResource Icon.Regions}" Content="{l:Loc Editor.Preview.Regions}"
|
|
ToolTip="{l:Loc Tooltips.Editor.Preview.Regions}" />
|
|
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="{Binding ShowCropMask}" ui:ButtonIcon.Glyph="{StaticResource Icon.CropMask}"
|
|
Content="{l:Loc Editor.Preview.CropMask}" ToolTip="{l:Loc Tooltips.Editor.Preview.CropMask}" />
|
|
<!-- "What I lose" (dimmed) or "how it will look" (hidden) outside the crop (BRIEF §12.3). -->
|
|
<ToggleButton Visibility="{Binding ShowCropMask, Converter={StaticResource BoolToVisibility}}" Style="{StaticResource ToggleButton.PreviewToolIcon}"
|
|
IsChecked="{Binding IsCropResult}" ui:ButtonIcon.Glyph="{StaticResource Icon.Eye}" ToolTip="{Binding CropModeToolTip}"
|
|
AutomationProperties.Name="{l:Loc Editor.Preview.CropResult}" />
|
|
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
|
|
IsChecked="{Binding IsActualSize}" Content="{l:Loc Editor.Preview.ActualSize}" ToolTip="{l:Loc Tooltips.Editor.Preview.ActualSize}" />
|
|
<Button Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource Button.PreviewToolIcon}"
|
|
ui:ButtonIcon.Glyph="{StaticResource Icon.Fullscreen}" Click="OnFullScreen" ToolTip="{l:Loc Tooltips.Editor.Preview.FullScreen}"
|
|
AutomationProperties.Name="{l:Loc Editor.Preview.FullScreen}" />
|
|
<Button Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource Button.PlayTool}"
|
|
Command="{Binding PlayCommand}" ToolTip="{Binding PlayToolTip}" AutomationProperties.Name="{Binding PlayName}" />
|
|
<Button Content="{l:Loc Editor.Preview.Clip}" Command="{Binding PreviewClipCommand}" ToolTip="{Binding ClipToolTip}"
|
|
Visibility="{Binding IsExportTab, Converter={StaticResource BoolToVisibility}}">
|
|
<Button.Style>
|
|
<Style TargetType="Button" BasedOn="{StaticResource Button.PreviewTool}">
|
|
<Setter Property="ui:ButtonIcon.Glyph" Value="{StaticResource Icon.Play}" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsPlaying}" Value="True">
|
|
<Setter Property="ui:ButtonIcon.Glyph" Value="{StaticResource Icon.Pause}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
</StackPanel>
|
|
</v:PreviewViewport.ToolsContent>
|
|
</v:PreviewViewport>
|
|
<!-- The frame on screen cannot be read: one sentence instead of another frame's picture. -->
|
|
<TextBlock Text="{Binding PreviewMessage}" Style="{StaticResource Text.Secondary}" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
IsHitTestVisible="False" Visibility="{Binding PreviewMessage, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
|
|
|
|
<v:Filmstrip Grid.Row="1" Margin="0,10,0,0" Source="{Binding Thumbnails}" CurrentIndex="{Binding CurrentIndex, Mode=TwoWay}" Markers="{Binding Markers}"
|
|
ToolTip="{l:Loc Tooltips.Editor.Filmstrip}" AutomationProperties.Name="{l:Loc Editor.Filmstrip}" />
|
|
|
|
<TabControl Grid.Row="2" Margin="0,10,0,0" ItemsSource="{Binding Tabs}" SelectedItem="{Binding SelectedTab}" AutomationProperties.Name="{l:Loc Editor.Sections}">
|
|
<TabControl.Resources>
|
|
<ResourceDictionary Source="pack://application:,,,/Titano;component/Editor/EditorMeasures.xaml" />
|
|
</TabControl.Resources>
|
|
<TabControl.ItemContainerStyle>
|
|
<Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}">
|
|
<Setter Property="Header" Value="{Binding Header}" />
|
|
<Setter Property="ToolTip" Value="{Binding ToolTip}" />
|
|
<Setter Property="AutomationProperties.Name" Value="{Binding Header}" />
|
|
</Style>
|
|
</TabControl.ItemContainerStyle>
|
|
</TabControl>
|
|
</Grid>
|
|
|
|
<ContentControl Grid.Column="1" Content="{Binding SelectedTab}" Focusable="False">
|
|
<ContentControl.Resources>
|
|
<ResourceDictionary Source="pack://application:,,,/Titano;component/Editor/EditorPanels.xaml" />
|
|
</ContentControl.Resources>
|
|
</ContentControl>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|