mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-27 23:25:00 +00:00
Upgrade project style
This commit is contained in:
parent
afd22ca85d
commit
baa6c1445a
136 changed files with 29 additions and 770 deletions
111
SourceGit/Resources/Styles/ToggleButton.xaml
Normal file
111
SourceGit/Resources/Styles/ToggleButton.xaml
Normal file
|
@ -0,0 +1,111 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style x:Key="Style.ToggleButton.Expender" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid Background="Transparent">
|
||||
<ContentPresenter/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Style.ToggleButton.Filter" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid>
|
||||
<Path
|
||||
x:Name="Icon"
|
||||
Height="12"
|
||||
Style="{DynamicResource Style.Icon}"
|
||||
Fill="Transparent"
|
||||
Stroke="{DynamicResource Brush.FG2}"
|
||||
StrokeThickness="1"
|
||||
Data="{DynamicResource Icon.Filter}"/>
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.FG2}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsChecked" Value="False"/>
|
||||
<Condition Property="IsMouseOver" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.FG2}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Style.ToggleButton.Orientation" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid Background="Transparent">
|
||||
<Path
|
||||
x:Name="Icon"
|
||||
Width="18"
|
||||
Height="18"
|
||||
Style="{DynamicResource Style.Icon}"
|
||||
Fill="{DynamicResource Brush.Border1}"
|
||||
Data="{DynamicResource Icon.Horizontal}"/>
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="Icon" Property="Data" Value="{DynamicResource Icon.Vertical}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.Accent1}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Style.ToggleButton.ListOrTree" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid Background="Transparent">
|
||||
<Path
|
||||
x:Name="Icon"
|
||||
Height="12"
|
||||
Width="12"
|
||||
Style="{DynamicResource Style.Icon}"
|
||||
Fill="Transparent"
|
||||
Stroke="{DynamicResource Brush.FG2}"
|
||||
StrokeThickness="1"
|
||||
Data="{DynamicResource Icon.Tree}"/>
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="Icon" Property="Data" Value="{DynamicResource Icon.List}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
Loading…
Add table
Add a link
Reference in a new issue