feat(diff-viewer): folder/file-type icons and change-kind colours in the file tree

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-10-02 10:31:55 +02:00
co-authored by Claude Sonnet 5.5
parent d8f78056c1
commit ae778d5c30
4 changed files with 119 additions and 5 deletions
+30
View File
@@ -292,6 +292,23 @@
<Setter Property="Foreground" Value="{StaticResource TextFaintBrush}" />
</Style>
<!-- diff file tree: folders stay neutral, file icons take the change-kind colour via Tag (A/D/M/R) -->
<Style Selector="PathIcon.tree-icon">
<Setter Property="Foreground" Value="{StaticResource TextMuteBrush}" />
</Style>
<Style Selector="PathIcon.tree-icon[Tag=A]">
<Setter Property="Foreground" Value="{StaticResource MossBrush}" />
</Style>
<Style Selector="PathIcon.tree-icon[Tag=D]">
<Setter Property="Foreground" Value="{StaticResource BloodBrush}" />
</Style>
<Style Selector="PathIcon.tree-icon[Tag=M]">
<Setter Property="Foreground" Value="{StaticResource PeatBrush}" />
</Style>
<Style Selector="PathIcon.tree-icon[Tag=R]">
<Setter Property="Foreground" Value="{StaticResource SageBrush}" />
</Style>
<!-- hover -->
<Style Selector=".icon-btn:pointerover PathIcon, .new-list-btn:pointerover PathIcon">
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
@@ -1071,6 +1088,19 @@
<Setter Property="FontSize" Value="{StaticResource FontSizeMono}" />
<Setter Property="Foreground" Value="{StaticResource TextDimBrush}" />
</Style>
<!-- diff file tree names: change-kind colour; must stay after TextBlock.meta -->
<Style Selector="TextBlock.tree-name[Tag=A]">
<Setter Property="Foreground" Value="{StaticResource MossBrush}" />
</Style>
<Style Selector="TextBlock.tree-name[Tag=D]">
<Setter Property="Foreground" Value="{StaticResource BloodBrush}" />
</Style>
<Style Selector="TextBlock.tree-name[Tag=M]">
<Setter Property="Foreground" Value="{StaticResource PeatBrush}" />
</Style>
<Style Selector="TextBlock.tree-name[Tag=R]">
<Setter Property="Foreground" Value="{StaticResource SageBrush}" />
</Style>
<!-- Default body / list values / descriptions -->
<Style Selector="TextBlock.body">