refactor!: rename Titano to Chronos and move CI and releases to Gitea (#6)
CI / Build and test (push) Successful in 8m14s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 13m19s
CI / PostgreSQL 16 integration (push) Successful in 4m49s
CI / PostgreSQL 17 integration (push) Successful in 5m28s
CI / Docker image (push) Successful in 53s
Release / Server image (push) Failing after 10s

The owner renamed the product and moved the repository to the self-hosted
Gitea (https://gitea.encke-hake.ts.net/BalboSoft/Chronos) for more control,
and asked for Actions and a first automatic release with the server package
and the Windows exe (docs/requests/2026-10-23-chronos-gitea.md).

- Chronos everywhere: a byte-exact rename of contents and paths, then a
  per-language review of the forms the old name's ending had dictated.
- Gitea instead of GitHub: the update check, licence, issue and support
  links read ChronosReleasesUrl; the update check takes the highest stable
  version, offers a pre-release build its final release and reports a
  repository it cannot see as a failed check. EULA, security policy and
  Gitea issue forms live at the repository root.
- Gitea Actions for the Linux act_runner (.gitea/workflows): CI, release,
  nightly image and performance gates in the .NET SDK container with git
  checkout and the system SQLite. The release cross-compiles the Windows
  programs, checks their icon, version and DPI manifest, packs installers
  and zips, publishes the Gitea release and pushes the server image
  (REGISTRY_TOKEN). Windows-only tests run in an opt-in job on a Windows
  runner (WINDOWS_RUNNER).
- New Chronos.Tools commands: zip, gitea-release, postgres-ci (replaces the
  docker-exec script, which Gitea's service containers do not allow; the
  throw-away server runs without durability) and pe-check.
- Timed tests take their budget from TestTiming (CHRONOS_TEST_TIME_FACTOR,
  3 on the shared runner; the weekly performance gates keep theirs).

BREAKING CHANGE: programs, settings, data folders, file types, environment
variables and the Docker image use the new name; nothing is migrated from
Titano, which never had a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-10-23 12:45:18 +02:00
1 parent c99842cc86
commit f2b58522b9
1801 files changed
+11804 -10676

No files matched your search

File diff suppressed because it is too large. Load diff
+70
View File
@@ -0,0 +1,70 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- DESIGN.md §1 tokens, Dark theme. Colours are referenced through DynamicResource so the theme can switch at run time. -->
<Color x:Key="Color.Bg">#1F1F23</Color>
<Color x:Key="Color.Chrome">#1A1A1E</Color>
<Color x:Key="Color.Surface">#26262C</Color>
<Color x:Key="Color.Card">#2F3038</Color>
<Color x:Key="Color.CardHover">#383943</Color>
<Color x:Key="Color.CardPressed">#2A2B32</Color>
<Color x:Key="Color.Stroke">#3E404A</Color>
<Color x:Key="Color.StrokeStrong">#535663</Color>
<Color x:Key="Color.Text">#F2F3F5</Color>
<Color x:Key="Color.TextMuted">#A9AEB9</Color>
<Color x:Key="Color.TextFaint">#7B818E</Color>
<Color x:Key="Color.Accent">#4CC2FF</Color>
<Color x:Key="Color.AccentHover">#6FCFFF</Color>
<Color x:Key="Color.AccentPressed">#3BA9E0</Color>
<Color x:Key="Color.OnAccent">#0B1B24</Color>
<Color x:Key="Color.AccentSelected">#404CC2FF</Color>
<Color x:Key="Color.AccentSubtle">#1F4CC2FF</Color>
<Color x:Key="Color.Sun">#F5A524</Color>
<Color x:Key="Color.Success">#35C48F</Color>
<Color x:Key="Color.Warning">#E8B339</Color>
<Color x:Key="Color.Error">#F0625D</Color>
<Color x:Key="Color.Region">#5AD1C8</Color>
<Color x:Key="Color.ToolTip">#F2F3F5</Color>
<Color x:Key="Color.OnToolTip">#1A1A1A</Color>
<Color x:Key="Color.Scrim">#99000000</Color>
<Color x:Key="Color.Track">#3E404A</Color>
<Color x:Key="Color.Preview">#141417</Color>
<Color x:Key="Color.WarningSubtle">#1FE8B339</Color>
<Color x:Key="Color.ErrorSubtle">#1FF0625D</Color>
<Color x:Key="Color.SuccessSubtle">#1F35C48F</Color>
<Color x:Key="Color.SunSubtle">#26F5A524</Color>
<Color x:Key="Color.CaptionCloseHover">#C42B1C</Color>
<Color x:Key="Color.Shadow">#66000000</Color>
<SolidColorBrush x:Key="Brush.Bg" Color="{StaticResource Color.Bg}" />
<SolidColorBrush x:Key="Brush.Chrome" Color="{StaticResource Color.Chrome}" />
<SolidColorBrush x:Key="Brush.Surface" Color="{StaticResource Color.Surface}" />
<SolidColorBrush x:Key="Brush.Card" Color="{StaticResource Color.Card}" />
<SolidColorBrush x:Key="Brush.CardHover" Color="{StaticResource Color.CardHover}" />
<SolidColorBrush x:Key="Brush.CardPressed" Color="{StaticResource Color.CardPressed}" />
<SolidColorBrush x:Key="Brush.Stroke" Color="{StaticResource Color.Stroke}" />
<SolidColorBrush x:Key="Brush.StrokeStrong" Color="{StaticResource Color.StrokeStrong}" />
<SolidColorBrush x:Key="Brush.Text" Color="{StaticResource Color.Text}" />
<SolidColorBrush x:Key="Brush.TextMuted" Color="{StaticResource Color.TextMuted}" />
<SolidColorBrush x:Key="Brush.TextFaint" Color="{StaticResource Color.TextFaint}" />
<SolidColorBrush x:Key="Brush.Accent" Color="{StaticResource Color.Accent}" />
<SolidColorBrush x:Key="Brush.AccentHover" Color="{StaticResource Color.AccentHover}" />
<SolidColorBrush x:Key="Brush.AccentPressed" Color="{StaticResource Color.AccentPressed}" />
<SolidColorBrush x:Key="Brush.OnAccent" Color="{StaticResource Color.OnAccent}" />
<SolidColorBrush x:Key="Brush.AccentSelected" Color="{StaticResource Color.AccentSelected}" />
<SolidColorBrush x:Key="Brush.AccentSubtle" Color="{StaticResource Color.AccentSubtle}" />
<SolidColorBrush x:Key="Brush.Sun" Color="{StaticResource Color.Sun}" />
<SolidColorBrush x:Key="Brush.Success" Color="{StaticResource Color.Success}" />
<SolidColorBrush x:Key="Brush.Warning" Color="{StaticResource Color.Warning}" />
<SolidColorBrush x:Key="Brush.Error" Color="{StaticResource Color.Error}" />
<SolidColorBrush x:Key="Brush.Region" Color="{StaticResource Color.Region}" />
<SolidColorBrush x:Key="Brush.ToolTip" Color="{StaticResource Color.ToolTip}" />
<SolidColorBrush x:Key="Brush.OnToolTip" Color="{StaticResource Color.OnToolTip}" />
<SolidColorBrush x:Key="Brush.Scrim" Color="{StaticResource Color.Scrim}" />
<SolidColorBrush x:Key="Brush.Track" Color="{StaticResource Color.Track}" />
<SolidColorBrush x:Key="Brush.Preview" Color="{StaticResource Color.Preview}" />
<SolidColorBrush x:Key="Brush.WarningSubtle" Color="{StaticResource Color.WarningSubtle}" />
<SolidColorBrush x:Key="Brush.ErrorSubtle" Color="{StaticResource Color.ErrorSubtle}" />
<SolidColorBrush x:Key="Brush.SuccessSubtle" Color="{StaticResource Color.SuccessSubtle}" />
<SolidColorBrush x:Key="Brush.SunSubtle" Color="{StaticResource Color.SunSubtle}" />
<SolidColorBrush x:Key="Brush.CaptionCloseHover" Color="{StaticResource Color.CaptionCloseHover}" />
<SolidColorBrush x:Key="Brush.Shadow" Color="{StaticResource Color.Shadow}" />
</ResourceDictionary>
+70
View File
@@ -0,0 +1,70 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- DESIGN.md §1 tokens, Light theme. Colours are referenced through DynamicResource so the theme can switch at run time. -->
<Color x:Key="Color.Bg">#F3F3F3</Color>
<Color x:Key="Color.Chrome">#FFFFFF</Color>
<Color x:Key="Color.Surface">#FFFFFF</Color>
<Color x:Key="Color.Card">#FFFFFF</Color>
<Color x:Key="Color.CardHover">#F5F5F5</Color>
<Color x:Key="Color.CardPressed">#EBEBEB</Color>
<Color x:Key="Color.Stroke">#E5E5E5</Color>
<Color x:Key="Color.StrokeStrong">#D1D1D1</Color>
<Color x:Key="Color.Text">#1A1A1A</Color>
<Color x:Key="Color.TextMuted">#616161</Color>
<Color x:Key="Color.TextFaint">#9E9E9E</Color>
<Color x:Key="Color.Accent">#0067C0</Color>
<Color x:Key="Color.AccentHover">#1975C5</Color>
<Color x:Key="Color.AccentPressed">#005AA8</Color>
<Color x:Key="Color.OnAccent">#FFFFFF</Color>
<Color x:Key="Color.AccentSelected">#E8F1FA</Color>
<Color x:Key="Color.AccentSubtle">#F0F6FC</Color>
<Color x:Key="Color.Sun">#E08A1E</Color>
<Color x:Key="Color.Success">#0F7B4F</Color>
<Color x:Key="Color.Warning">#9A6700</Color>
<Color x:Key="Color.Error">#C42B1C</Color>
<Color x:Key="Color.Region">#1A9E95</Color>
<Color x:Key="Color.ToolTip">#1A1A1A</Color>
<Color x:Key="Color.OnToolTip">#F2F3F5</Color>
<Color x:Key="Color.Scrim">#66000000</Color>
<Color x:Key="Color.Track">#E0E0E0</Color>
<Color x:Key="Color.Preview">#E9E9EC</Color>
<Color x:Key="Color.WarningSubtle">#FFF4CE</Color>
<Color x:Key="Color.ErrorSubtle">#FDE7E9</Color>
<Color x:Key="Color.SuccessSubtle">#DFF6DD</Color>
<Color x:Key="Color.SunSubtle">#FFF1DE</Color>
<Color x:Key="Color.CaptionCloseHover">#C42B1C</Color>
<Color x:Key="Color.Shadow">#33000000</Color>
<SolidColorBrush x:Key="Brush.Bg" Color="{StaticResource Color.Bg}" />
<SolidColorBrush x:Key="Brush.Chrome" Color="{StaticResource Color.Chrome}" />
<SolidColorBrush x:Key="Brush.Surface" Color="{StaticResource Color.Surface}" />
<SolidColorBrush x:Key="Brush.Card" Color="{StaticResource Color.Card}" />
<SolidColorBrush x:Key="Brush.CardHover" Color="{StaticResource Color.CardHover}" />
<SolidColorBrush x:Key="Brush.CardPressed" Color="{StaticResource Color.CardPressed}" />
<SolidColorBrush x:Key="Brush.Stroke" Color="{StaticResource Color.Stroke}" />
<SolidColorBrush x:Key="Brush.StrokeStrong" Color="{StaticResource Color.StrokeStrong}" />
<SolidColorBrush x:Key="Brush.Text" Color="{StaticResource Color.Text}" />
<SolidColorBrush x:Key="Brush.TextMuted" Color="{StaticResource Color.TextMuted}" />
<SolidColorBrush x:Key="Brush.TextFaint" Color="{StaticResource Color.TextFaint}" />
<SolidColorBrush x:Key="Brush.Accent" Color="{StaticResource Color.Accent}" />
<SolidColorBrush x:Key="Brush.AccentHover" Color="{StaticResource Color.AccentHover}" />
<SolidColorBrush x:Key="Brush.AccentPressed" Color="{StaticResource Color.AccentPressed}" />
<SolidColorBrush x:Key="Brush.OnAccent" Color="{StaticResource Color.OnAccent}" />
<SolidColorBrush x:Key="Brush.AccentSelected" Color="{StaticResource Color.AccentSelected}" />
<SolidColorBrush x:Key="Brush.AccentSubtle" Color="{StaticResource Color.AccentSubtle}" />
<SolidColorBrush x:Key="Brush.Sun" Color="{StaticResource Color.Sun}" />
<SolidColorBrush x:Key="Brush.Success" Color="{StaticResource Color.Success}" />
<SolidColorBrush x:Key="Brush.Warning" Color="{StaticResource Color.Warning}" />
<SolidColorBrush x:Key="Brush.Error" Color="{StaticResource Color.Error}" />
<SolidColorBrush x:Key="Brush.Region" Color="{StaticResource Color.Region}" />
<SolidColorBrush x:Key="Brush.ToolTip" Color="{StaticResource Color.ToolTip}" />
<SolidColorBrush x:Key="Brush.OnToolTip" Color="{StaticResource Color.OnToolTip}" />
<SolidColorBrush x:Key="Brush.Scrim" Color="{StaticResource Color.Scrim}" />
<SolidColorBrush x:Key="Brush.Track" Color="{StaticResource Color.Track}" />
<SolidColorBrush x:Key="Brush.Preview" Color="{StaticResource Color.Preview}" />
<SolidColorBrush x:Key="Brush.WarningSubtle" Color="{StaticResource Color.WarningSubtle}" />
<SolidColorBrush x:Key="Brush.ErrorSubtle" Color="{StaticResource Color.ErrorSubtle}" />
<SolidColorBrush x:Key="Brush.SuccessSubtle" Color="{StaticResource Color.SuccessSubtle}" />
<SolidColorBrush x:Key="Brush.SunSubtle" Color="{StaticResource Color.SunSubtle}" />
<SolidColorBrush x:Key="Brush.CaptionCloseHover" Color="{StaticResource Color.CaptionCloseHover}" />
<SolidColorBrush x:Key="Brush.Shadow" Color="{StaticResource Color.Shadow}" />
</ResourceDictionary>
+85
View File
@@ -0,0 +1,85 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
<!-- DESIGN.md §2–3: one typeface, six sizes, 4-px spacing scale, fixed radii and sizes. -->
<FontFamily x:Key="Font.Ui">Segoe UI Variable Text, Segoe UI, Microsoft YaHei UI, Yu Gothic UI, Malgun Gothic, Leelawadee UI, Nirmala UI, Tahoma</FontFamily>
<FontFamily x:Key="Font.Display">Segoe UI Variable Display, Segoe UI, Microsoft YaHei UI, Yu Gothic UI, Malgun Gothic</FontFamily>
<FontFamily x:Key="Font.Mono">Cascadia Mono, Consolas</FontFamily>
<sys:Double x:Key="Size.PageTitle">18</sys:Double>
<sys:Double x:Key="Size.Title">16</sys:Double>
<sys:Double x:Key="Size.Section">14</sys:Double>
<sys:Double x:Key="Size.Body">13</sys:Double>
<sys:Double x:Key="Size.Secondary">12</sys:Double>
<sys:Double x:Key="Size.Chip">11</sys:Double>
<Thickness x:Key="Space.1">4</Thickness>
<Thickness x:Key="Space.2">8</Thickness>
<Thickness x:Key="Space.3">12</Thickness>
<Thickness x:Key="Space.4">16</Thickness>
<Thickness x:Key="Space.5">20</Thickness>
<CornerRadius x:Key="Radius.Control">6</CornerRadius>
<CornerRadius x:Key="Radius.Card">8</CornerRadius>
<CornerRadius x:Key="Radius.Pill">12</CornerRadius>
<CornerRadius x:Key="Radius.Dialog">12</CornerRadius>
<sys:Double x:Key="Height.Control">32</sys:Double>
<sys:Double x:Key="Height.Compact">28</sys:Double>
<sys:Double x:Key="Height.Row">38</sys:Double>
<sys:Double x:Key="Height.TitleBar">34</sys:Double>
<sys:Double x:Key="Height.JobBar">40</sys:Double>
<sys:Double x:Key="Height.Toolbar">56</sys:Double>
<sys:Double x:Key="Height.StatusBar">30</sys:Double>
<sys:Double x:Key="Width.Rail">200</sys:Double>
<sys:Double x:Key="Width.RailCollapsed">48</sys:Double>
<sys:Double x:Key="Width.SidePanel">320</sys:Double>
<GridLength x:Key="Grid.SettingsList">200</GridLength>
<GridLength x:Key="Grid.LabelColumn">116</GridLength>
<GridLength x:Key="Grid.SettingsLabelColumn">180</GridLength>
<Style x:Key="Text.Base" TargetType="TextBlock">
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="Text.PageTitle" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}">
<Setter Property="FontFamily" Value="{StaticResource Font.Display}" />
<Setter Property="FontSize" Value="{StaticResource Size.PageTitle}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="LineHeight" Value="24" />
</Style>
<Style x:Key="Text.Title" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}">
<Setter Property="FontSize" Value="{StaticResource Size.Title}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="LineHeight" Value="22" />
</Style>
<Style x:Key="Text.Section" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}">
<Setter Property="FontSize" Value="{StaticResource Size.Section}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="LineHeight" Value="20" />
</Style>
<Style x:Key="Text.Body" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}" />
<Style x:Key="Text.Secondary" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}">
<Setter Property="FontSize" Value="{StaticResource Size.Secondary}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
</Style>
<Style x:Key="Text.Faint" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}">
<Setter Property="FontSize" Value="{StaticResource Size.Chip}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextFaint}" />
</Style>
<Style x:Key="Text.Chip" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}">
<Setter Property="FontSize" Value="{StaticResource Size.Chip}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
</Style>
<Style x:Key="Text.ColumnHeader" TargetType="TextBlock" BasedOn="{StaticResource Text.Faint}">
<Setter Property="FontSize" Value="11" />
</Style>
<!-- Tabular numbers for tables and counters (DESIGN §2). -->
<Style x:Key="Text.Number" TargetType="TextBlock" BasedOn="{StaticResource Text.Base}">
<Setter Property="Typography.NumeralAlignment" Value="Tabular" />
<Setter Property="TextAlignment" Value="Right" />
</Style>
</ResourceDictionary>
+325
View File
@@ -0,0 +1,325 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="clr-namespace:Chronos.Ui.Controls"
xmlns:v="clr-namespace:Chronos.Ui.Visuals"
xmlns:l="clr-namespace:Chronos.Ui.Localization">
<!--
Styles of the high-performance visuals (Chronos.Ui.Visuals), merged by Controls.xaml. Brushes and the shared
button templates of Controls.xaml are DynamicResource (they live in the parent dictionary); sizes, radii and
fonts are StaticResource from Typography.xaml, merged here so they resolve while this dictionary loads.
-->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Chronos.Ui;component/Themes/Typography.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- ===================== Library grid: card container and list ===================== -->
<Style x:Key="ListBoxItem.Card" TargetType="ListBoxItem">
<Setter Property="FocusVisualStyle" Value="{DynamicResource Focus.Ring}" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Virtualized, recycling card grid (BRIEF §12.2). Item template: a v:SequenceCard bound to the item. Disabled (behind a
dialog), it keeps its fill like every other list (Controls.xaml Template.ListBox). -->
<Style x:Key="ListBox.Cards" TargetType="ListBox">
<Setter Property="Template" Value="{DynamicResource Template.ListBox}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="SelectionMode" Value="Extended" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
<Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly" />
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True" />
<Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling" />
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItem.Card}" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<v:VirtualizingWrapPanel Padding="20,4,20,12" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Sequence card (DESIGN §4 Cards) ===================== -->
<DataTemplate x:Key="Template.CardStatus" DataType="{x:Type v:CardStatus}">
<ui:StatusGlyph Kind="{Binding Kind}" Text="{Binding Text}" ToolTip="{Binding ToolTip}" Margin="0,0,8,0" />
</DataTemplate>
<Style TargetType="v:SequenceCard">
<Setter Property="Width" Value="236" />
<Setter Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="AutomationProperties.Name" Value="{Binding Title, RelativeSource={RelativeSource Self}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="v:SequenceCard">
<Grid>
<Border x:Name="Glow" Margin="-3" CornerRadius="11" BorderThickness="3" BorderBrush="{DynamicResource Brush.AccentSelected}" Visibility="Collapsed" />
<Border x:Name="Frame" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1"
CornerRadius="{StaticResource Radius.Card}">
<StackPanel>
<v:AspectRatioDecorator>
<!-- The photo and the scrub position are a left-to-right island (time runs left to right, as in the
filmstrip); the check box, badge and quick actions follow the layout direction. -->
<Grid Background="Transparent">
<Border CornerRadius="7,7,0,0" Background="{DynamicResource Brush.Preview}" />
<Border x:Name="PART_Thumbnail" CornerRadius="7,7,0,0" FlowDirection="LeftToRight">
<Border.Background>
<ImageBrush ImageSource="{Binding DisplayedThumbnail, RelativeSource={RelativeSource TemplatedParent}}" Stretch="UniformToFill" />
</Border.Background>
</Border>
<Border x:Name="ScrubTrack" Height="2" VerticalAlignment="Bottom" Background="{DynamicResource Brush.Accent}" RenderTransformOrigin="0,0.5" Visibility="Collapsed"
FlowDirection="LeftToRight">
<Border.RenderTransform>
<ScaleTransform ScaleX="{Binding ScrubPosition, RelativeSource={RelativeSource TemplatedParent}}" />
</Border.RenderTransform>
</Border>
<CheckBox x:Name="Select" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8" Focusable="False" Visibility="Collapsed"
IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" ToolTip="{TemplateBinding SelectToolTip}" />
<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8"
Visibility="{Binding Badge, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
<Border Background="{DynamicResource Brush.Chrome}" Opacity="0.85" CornerRadius="4" />
<TextBlock Text="{TemplateBinding Badge}" Margin="6,2" FontSize="{StaticResource Size.Chip}" Typography.NumeralAlignment="Tabular" />
</Grid>
<ContentPresenter x:Name="Actions" Content="{TemplateBinding ActionsContent}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="8" Visibility="Collapsed" />
</Grid>
</v:AspectRatioDecorator>
<StackPanel Margin="10,8,10,8">
<TextBlock Text="{TemplateBinding Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" />
<TextBlock Text="{TemplateBinding Subtitle}" Margin="0,4,0,0" FontSize="{StaticResource Size.Secondary}" Foreground="{DynamicResource Brush.TextMuted}"
TextTrimming="CharacterEllipsis" Typography.NumeralAlignment="Tabular" />
<ItemsControl ItemsSource="{TemplateBinding Statuses}" ItemTemplate="{StaticResource Template.CardStatus}" Margin="0,4,0,0" Focusable="False">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
</StackPanel>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Select" Property="Visibility" Value="Visible" />
<Setter TargetName="Actions" Property="Visibility" Value="Visible" />
<Setter TargetName="Frame" Property="BorderBrush" Value="{DynamicResource Brush.StrokeStrong}" />
</Trigger>
<Trigger Property="IsScrubbing" Value="True">
<Setter TargetName="ScrubTrack" Property="Visibility" Value="Visible" />
</Trigger>
<!-- A selected card keeps its actions in sight, so the keyboard reaches them (Tab from the card). -->
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Select" Property="Visibility" Value="Visible" />
<Setter TargetName="Actions" Property="Visibility" Value="Visible" />
<Setter TargetName="Frame" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Glow" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter TargetName="Actions" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Focusable drawn visuals ===================== -->
<Style TargetType="v:Filmstrip">
<Setter Property="FocusVisualStyle" Value="{DynamicResource Focus.Ring}" />
</Style>
<Style TargetType="v:CurveEditor">
<Setter Property="FocusVisualStyle" Value="{DynamicResource Focus.Ring}" />
</Style>
<!-- Charts that something activates take the keyboard and outline the bar, segment or cell it is on themselves. -->
<Style TargetType="v:BarChart">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Style>
<Style TargetType="v:StackedBar">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Style>
<Style TargetType="v:HeatmapStrip">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Style>
<!-- ===================== Preview viewport (BRIEF §12.3) ===================== -->
<!-- The image surface (a drawn visual, always left to right) and the numeric shot data stay left to right; the tool
row follows the layout direction. -->
<Style TargetType="v:PreviewViewport">
<Setter Property="Background" Value="{DynamicResource Brush.Preview}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Secondary}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource Focus.Ring}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="v:PreviewViewport">
<Border Background="{TemplateBinding Background}" CornerRadius="{StaticResource Radius.Card}">
<Grid>
<v:PreviewSurface x:Name="PART_Surface" CornerRadius="8" />
<ContentPresenter x:Name="PART_Tools" Content="{TemplateBinding ToolsContent}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="12" />
<Grid x:Name="PART_Info" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="12" IsHitTestVisible="False" FlowDirection="LeftToRight">
<Border Background="{DynamicResource Brush.Chrome}" Opacity="0.85" CornerRadius="{StaticResource Radius.Control}" />
<TextBlock Text="{TemplateBinding InfoText}" Margin="10,6" Typography.NumeralAlignment="Tabular" TextTrimming="CharacterEllipsis" />
</Grid>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="InfoText" Value="{x:Null}">
<Setter TargetName="PART_Info" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="InfoText" Value="">
<Setter TargetName="PART_Info" Property="Visibility" Value="Collapsed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Segmented control (Library view switcher) ===================== -->
<Style TargetType="v:SegmentedControl">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="v:SegmentedControl">
<StackPanel Orientation="Horizontal" IsItemsHost="True" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="v:SegmentedItem">
<Setter Property="FocusVisualStyle" Value="{DynamicResource Focus.Ring}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
<Setter Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="Height" Value="{StaticResource Height.Control}" />
<Setter Property="MinWidth" Value="32" />
<Setter Property="Padding" Value="8,0" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="v:SegmentedItem">
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1"
CornerRadius="{StaticResource Radius.Control}" SnapsToDevicePixels="True">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}">
<ui:Icon x:Name="Glyph" Glyph="{TemplateBinding Glyph}" VerticalAlignment="Center" />
<ContentPresenter x:Name="Content" Margin="6,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True" />
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Position" Value="First">
<Setter TargetName="Bd" Property="CornerRadius" Value="6,0,0,6" />
</Trigger>
<Trigger Property="Position" Value="Middle">
<Setter TargetName="Bd" Property="CornerRadius" Value="0" />
<Setter Property="Margin" Value="-1,0,0,0" />
</Trigger>
<Trigger Property="Position" Value="Last">
<Setter TargetName="Bd" Property="CornerRadius" Value="0,6,6,0" />
<Setter Property="Margin" Value="-1,0,0,0" />
</Trigger>
<Trigger Property="Glyph" Value="{x:Null}">
<Setter TargetName="Glyph" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Content" Property="Margin" Value="0" />
</Trigger>
<Trigger Property="Content" Value="{x:Null}">
<Setter TargetName="Content" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.CardHover}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.AccentSubtle}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Panel.ZIndex" Value="1" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Split button (Render ▾) ===================== -->
<Style x:Key="SplitButton.ArrowPrimary" TargetType="ToggleButton">
<Setter Property="Template" Value="{DynamicResource Template.Button}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource Focus.Ring}" />
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.AccentPressed}" />
<Setter Property="BorderThickness" Value="1,0,0,0" />
<Setter Property="Foreground" Value="{DynamicResource Brush.OnAccent}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.AccentHover}" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="{DynamicResource Brush.AccentPressed}" />
<Setter Property="ui:ControlState.PressedBackground" Value="{DynamicResource Brush.AccentPressed}" />
</Style>
<Style TargetType="v:SplitButton">
<Setter Property="Height" Value="{StaticResource Height.Control}" />
<Setter Property="DropDownName" Value="{l:Loc Common.MoreChoices}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="v:SplitButton">
<StackPanel Orientation="Horizontal">
<Button x:Name="Main" Style="{DynamicResource Button.Base}" Height="{TemplateBinding Height}" ui:ControlState.CornerRadius="6,0,0,6"
Content="{TemplateBinding Content}" Command="{TemplateBinding Command}" CommandParameter="{TemplateBinding CommandParameter}"
CommandTarget="{TemplateBinding CommandTarget}" />
<ToggleButton x:Name="Arrow" Style="{DynamicResource Button.Base}" Height="{TemplateBinding Height}" Width="28" MinWidth="28" Padding="0" Margin="-1,0,0,0"
ClickMode="Press" ui:ControlState.CornerRadius="0,6,6,0" ui:ButtonIcon.Glyph="{DynamicResource Icon.ChevronDown}"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" ToolTip="{TemplateBinding DropDownToolTip}"
AutomationProperties.Name="{Binding DropDownName, RelativeSource={RelativeSource TemplatedParent}}" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsPrimary" Value="True">
<Setter TargetName="Main" Property="Style" Value="{DynamicResource Button.Primary}" />
<Setter TargetName="Arrow" Property="Style" Value="{StaticResource SplitButton.ArrowPrimary}" />
<Setter TargetName="Arrow" Property="Margin" Value="0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>