mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-03 01:55:00 +00:00
refactor<*>: use DynamicResource instead of StaticResource for brushes and locales
This commit is contained in:
parent
4a56b47265
commit
afc4eafb6f
73 changed files with 630 additions and 601 deletions
|
@ -15,7 +15,7 @@
|
|||
<converters:InverseBool x:Key="InverseBool"/>
|
||||
</Grid.Resources>
|
||||
|
||||
<Border x:Name="commitListPanel" Background="{StaticResource Brush.Contents}">
|
||||
<Border x:Name="commitListPanel" Background="{DynamicResource Brush.Contents}">
|
||||
<Grid ClipToBounds="True">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
@ -28,21 +28,21 @@
|
|||
x:Name="txtSearch"
|
||||
Margin="4" Padding="0,0,22,0"
|
||||
Height="24"
|
||||
Placeholder="{StaticResource Text.Histories.Search}"
|
||||
Placeholder="{DynamicResource Text.Histories.Search}"
|
||||
PreviewKeyDown="OnSearchPreviewKeyDown"/>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="8,0">
|
||||
<controls:IconButton
|
||||
Click="ClearSearch"
|
||||
Width="14" Height="14"
|
||||
Icon="{StaticResource Icon.Clear}"
|
||||
Foreground="{StaticResource Brush.FG2}"
|
||||
ToolTip="{StaticResource Text.Histories.SearchClear}"/>
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
ToolTip="{DynamicResource Text.Histories.SearchClear}"/>
|
||||
<controls:IconButton
|
||||
Click="HideSearch"
|
||||
Width="14" Height="14" Margin="6,0,0,0"
|
||||
Icon="{StaticResource Icon.Up}"
|
||||
Foreground="{StaticResource Brush.FG2}"
|
||||
ToolTip="{StaticResource Text.Close}"/>
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
ToolTip="{DynamicResource Text.Close}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
@ -72,8 +72,8 @@
|
|||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:Decorator}">
|
||||
<StackPanel Orientation="Horizontal" Height="16" Margin="2,0">
|
||||
<Border Background="{StaticResource Brush.Decorator}">
|
||||
<Path x:Name="Icon" Margin="4,0" Width="8" Height="8" Data="{StaticResource Icon.Branch}" Fill="{StaticResource Brush.DecoratorIcon}"/>
|
||||
<Border Background="{DynamicResource Brush.Decorator}">
|
||||
<Path x:Name="Icon" Margin="4,0" Width="8" Height="8" Data="{StaticResource Icon.Branch}" Fill="{DynamicResource Brush.DecoratorIcon}"/>
|
||||
</Border>
|
||||
|
||||
<Border x:Name="Color" Background="#FFFFB835">
|
||||
|
@ -160,7 +160,7 @@
|
|||
</Grid>
|
||||
</Border>
|
||||
|
||||
<GridSplitter x:Name="splitter" Background="{StaticResource Brush.Border0}"/>
|
||||
<GridSplitter x:Name="splitter" Background="{DynamicResource Brush.Border0}"/>
|
||||
|
||||
<Grid x:Name="inspector">
|
||||
|
||||
|
@ -171,7 +171,7 @@
|
|||
<widgets:RevisionCompare x:Name="revisionCompare"/>
|
||||
|
||||
<!-- Mask -->
|
||||
<Border x:Name="mask" Background="{StaticResource Brush.Window}">
|
||||
<Border x:Name="mask" Background="{DynamicResource Brush.Window}">
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".25">
|
||||
<Path Width="128" Height="128" Data="{StaticResource Icon.Detail}"/>
|
||||
|
||||
|
@ -181,13 +181,13 @@
|
|||
FontFamily="Consolas" FontSize="24" FontWeight="UltraBold"
|
||||
HorizontalAlignment="Center"
|
||||
TextOptions.TextFormattingMode="Ideal"
|
||||
Text="{StaticResource Text.Histories.Guide}"/>
|
||||
Text="{DynamicResource Text.Histories.Guide}"/>
|
||||
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" TextBlock.FontFamily="Consolas,Microsoft YaHei UI">
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_1}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_2}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_3}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_4}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{DynamicResource Text.Histories.Guide_1}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{DynamicResource Text.Histories.Guide_2}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{DynamicResource Text.Histories.Guide_3}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{DynamicResource Text.Histories.Guide_4}" FontSize="14" Margin="0,2"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
@ -196,18 +196,18 @@
|
|||
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,6,8,0" Orientation="Horizontal">
|
||||
<ToggleButton
|
||||
Style="{StaticResource Style.ToggleButton.CommitGraphMode}"
|
||||
Foreground="{StaticResource Brush.FG2}"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
Width="16" Height="16"
|
||||
ToolTip="{StaticResource Text.Histories.GraphMode}"
|
||||
ToolTip="{DynamicResource Text.Histories.GraphMode}"
|
||||
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.UsePolylineInGraph, Mode=TwoWay}"
|
||||
Checked="ChangeGraphMode" Unchecked="ChangeGraphMode"/>
|
||||
|
||||
<ToggleButton
|
||||
Style="{StaticResource Style.ToggleButton.SplitDirection}"
|
||||
Foreground="{StaticResource Brush.FG2}"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
Width="16" Height="16"
|
||||
Margin="8,0,0,0"
|
||||
ToolTip="{StaticResource Text.Histories.DisplayMode}"
|
||||
ToolTip="{DynamicResource Text.Histories.DisplayMode}"
|
||||
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.MoveCommitInfoRight, Mode=TwoWay, Converter={StaticResource InverseBool}}"
|
||||
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
|
||||
</StackPanel>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue