mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-02 09:35:00 +00:00
style<*>: use Style.Icon as default style of Path
This commit is contained in:
parent
b36ab87bcc
commit
1d401d0955
46 changed files with 150 additions and 161 deletions
|
@ -4,8 +4,8 @@
|
|||
<Style x:Key="Style.Button" TargetType="{x:Type Button}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.FG1}"/>
|
||||
<Setter Property="Opacity" Value="0.9"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Opacity" Value=".8"/>
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{DynamicResource Brush.Border1}" Background="Transparent"/>
|
||||
<Border Grid.Column="0" CornerRadius="0" Margin="1" Background="Transparent"/>
|
||||
<Path x:Name="Arrow" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="{DynamicResource Brush.Border1}"/>
|
||||
<Path x:Name="Arrow" Grid.Column="1" Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="{DynamicResource Brush.Border1}"/>
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
|
@ -56,6 +56,9 @@
|
|||
<Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0" />
|
||||
<Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value=".5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
|
|
@ -9,4 +9,7 @@
|
|||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
|
||||
</Style>
|
||||
|
||||
<!-- 修改默认样式 -->
|
||||
<Style TargetType="{x:Type Path}" BasedOn="{StaticResource Style.Icon}"/>
|
||||
</ResourceDictionary>
|
|
@ -12,7 +12,7 @@
|
|||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Grid Width="16" Height="16" Margin="1" Background="Transparent">
|
||||
<Path x:Name="ExpandPath" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1" Fill="{DynamicResource Brush.FG1}" Data="M 4 0 L 8 4 L 4 8 Z"/>
|
||||
<Path x:Name="ExpandPath" HorizontalAlignment="Left" Width="8" Height="8" VerticalAlignment="Center" Margin="4,0,0,0" Fill="{DynamicResource Brush.FG1}" Data="M 4 0 L 8 4 L 4 8 Z"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
|
@ -31,16 +31,15 @@
|
|||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, Mode=OneWay, FallbackValue=Stretch, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, Mode=OneWay, FallbackValue=Center, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="Padding" Value="{Binding Padding, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<StackPanel>
|
||||
<Border
|
||||
x:Name="BG"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
||||
<Border x:Name="BG"
|
||||
Background="Transparent"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
||||
<Grid
|
||||
Margin="{Binding Converter={StaticResource Converter.TreeViewItemIndent}, RelativeSource={x:Static RelativeSource.TemplatedParent}}"
|
||||
VerticalAlignment="Stretch"
|
||||
|
@ -179,8 +178,7 @@
|
|||
BorderThickness="0"
|
||||
CornerRadius="0"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
||||
<ScrollViewer Padding="{TemplateBinding Padding}"
|
||||
CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
|
||||
<ScrollViewer CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
|
||||
Focusable="False"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue