refactor(ui): tokenize and dynamic-ize PlanningDiffView
Convert StaticResource token attrs to DynamicResource, snap font sizes to tokens, replace Consolas,Menlo,monospace with MonoFont DynamicResource, and fold Orange warning color to BloodBrush. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,34 +8,34 @@
|
||||
WindowDecorations="None"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Background="{StaticResource SurfaceBrush}">
|
||||
Background="{DynamicResource SurfaceBrush}">
|
||||
|
||||
<Window.KeyBindings>
|
||||
<KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/>
|
||||
</Window.KeyBindings>
|
||||
|
||||
<Border Background="{StaticResource SurfaceBrush}"
|
||||
BorderBrush="{StaticResource LineBrush}"
|
||||
<Border Background="{DynamicResource SurfaceBrush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="1">
|
||||
<Grid RowDefinitions="36,Auto,*">
|
||||
|
||||
<!-- Title bar / drag handle -->
|
||||
<Border Grid.Row="0"
|
||||
x:Name="TitleBar"
|
||||
Background="{StaticResource Surface2Brush}"
|
||||
BorderBrush="{StaticResource LineBrush}"
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="0,0,0,1"
|
||||
PointerPressed="TitleBar_PointerPressed">
|
||||
<Grid ColumnDefinitions="*,Auto" Margin="14,0">
|
||||
<TextBlock Text="Planning — Combined diff"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{StaticResource MonoFamily}"
|
||||
FontSize="12"
|
||||
Foreground="{StaticResource TextDimBrush}"/>
|
||||
FontFamily="{DynamicResource MonoFont}"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
Foreground="{DynamicResource TextDimBrush}"/>
|
||||
<Button Grid.Column="1"
|
||||
Classes="icon-btn"
|
||||
Content="✕"
|
||||
FontSize="12"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
Command="{Binding CloseCommand}"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
@@ -48,7 +48,7 @@
|
||||
Margin="8,6">
|
||||
<ToggleButton Content="Preview combined" IsChecked="{Binding IsCombinedMode}"/>
|
||||
<TextBlock Text="{Binding CombinedWarning}"
|
||||
Foreground="Orange"
|
||||
Foreground="{DynamicResource BloodBrush}"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding CombinedWarning, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
<TextBlock Text="Loading…"
|
||||
@@ -61,9 +61,9 @@
|
||||
|
||||
<!-- Subtask list (left pane) -->
|
||||
<Border Grid.Column="0"
|
||||
BorderBrush="{StaticResource LineBrush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="0,0,1,0"
|
||||
Background="{StaticResource DeepBrush}">
|
||||
Background="{DynamicResource DeepBrush}">
|
||||
<ListBox ItemsSource="{Binding Subtasks}"
|
||||
SelectedItem="{Binding SelectedSubtask}"
|
||||
IsEnabled="{Binding !IsCombinedMode}"
|
||||
@@ -79,8 +79,8 @@
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock Text="{Binding DiffStat}"
|
||||
Opacity="0.7"
|
||||
FontFamily="{StaticResource MonoFamily}"
|
||||
FontSize="11"/>
|
||||
FontFamily="{DynamicResource MonoFont}"
|
||||
FontSize="{StaticResource FontSizeMono}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
@@ -89,14 +89,14 @@
|
||||
</Border>
|
||||
|
||||
<!-- Diff content (right pane) -->
|
||||
<Grid Grid.Column="1" Background="{StaticResource VoidBrush}">
|
||||
<Grid Grid.Column="1" Background="{DynamicResource VoidBrush}">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<TextBox Text="{Binding DisplayedDiff, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
AcceptsReturn="True"
|
||||
FontFamily="Consolas,Menlo,monospace"
|
||||
FontSize="12"
|
||||
FontFamily="{DynamicResource MonoFont}"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Padding="8"/>
|
||||
|
||||
Reference in New Issue
Block a user