style<*>: set Background of all widgets used to display content of file to Brush.Contents for

This commit is contained in:
leo 2024-03-04 21:23:17 +08:00
parent ade43ed988
commit 01ddd07de5
3 changed files with 5 additions and 3 deletions

View file

@ -27,7 +27,7 @@
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,*,Auto">
<!-- Bottom border -->
<Rectangle Grid.Column="0" Grid.ColumnSpan="5" Fill="{DynamicResource Brush.Border0}" Height="1" VerticalAlignment="Bottom"/>
<Rectangle Grid.Column="0" Grid.ColumnSpan="5" Fill="{DynamicResource Brush.Border2}" Height="1" VerticalAlignment="Bottom"/>
<!-- Caption Buttons (macOS) -->
<Border Grid.Column="0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
@ -55,6 +55,7 @@
VerticalScrollBarVisibility="Auto"
BorderBrush="{DynamicResource Brush.Border2}"
BorderThickness="0"
Background="{DynamicResource Brush.Contents}"
Foreground="{DynamicResource Brush.FG1}"
FontFamily="{StaticResource JetBrainsMono}"
FontSize="12"

View file

@ -89,7 +89,7 @@
</DataTemplate>
<DataTemplate DataType="m:RevisionTextFile">
<v:RevisionTextFileView FontFamily="{StaticResource JetBrainsMono}" FontSize="12" />
<v:RevisionTextFileView FontFamily="{StaticResource JetBrainsMono}" FontSize="12" Background="{DynamicResource Brush.Contents}"/>
</DataTemplate>
<DataTemplate DataType="m:RevisionLFSObject">

View file

@ -7,7 +7,8 @@
xmlns:v="using:SourceGit.Views"
xmlns:c="using:SourceGit.Converters"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.TextDiffView">
x:Class="SourceGit.Views.TextDiffView"
Background="{DynamicResource Brush.Contents}">
<UserControl.DataTemplates>
<DataTemplate DataType="m:TextDiff">
<v:CombinedTextDiffPresenter HorizontalScrollBarVisibility="Auto"