style<Icon>: remove duplicated icons

This commit is contained in:
leo 2021-04-07 16:27:04 +08:00
parent a71a877387
commit 9cf3c37f1b
5 changed files with 14 additions and 43 deletions

View file

@ -25,8 +25,6 @@
<Geometry x:Key="Icon.Tree">M912 737l0 150L362 887l0-100 0-50 0-150 0-150 0-150L112 287l0-150 450 0 0 150L412 287l0 150L912 437l0 150L412 587l0 150L912 737z</Geometry>
<Geometry x:Key="Icon.Grid">M256 256l220.16 0 0 220.16-220.16 0 0-220.16ZM547.84 256l220.16 0 0 220.16-220.16 0 0-220.16ZM256 547.84l220.16 0 0 220.16-220.16 0 0-220.16ZM547.84 547.84l220.16 0 0 220.16-220.16 0 0-220.16Z</Geometry>
<Geometry x:Key="Icon.MoveUp">M868 545.5L536.1 163c-12.7-14.7-35.5-14.7-48.3 0L156 545.5c-4.5 5.2-0.8 13.2 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z</Geometry>
<Geometry x:Key="Icon.MoveDown">M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861c12.7 14.7 35.5 14.7 48.3 0L868 478.5c4.5-5.2 0.8-13.2-6-13.2z</Geometry>
<Geometry x:Key="Icon.Down">M509.44 546.304l270.848-270.912 90.56 90.56-347.52 349.056-0.832-0.768-13.056 13.056-362.624-361.28 91.136-91.264z</Geometry>
<Geometry x:Key="Icon.DoubleDown">M256 224l1e-8 115.2L512 544l255.99999999-204.8 1e-8-115.2-256 204.80000001L256 224zM512 684.8l-256-204.8L256 595.2 512 800 768 595.2l0-115.2L512 684.8z</Geometry>
<Geometry x:Key="Icon.Up">M169.5 831l342.8-341.9L855.1 831l105.3-105.3-448.1-448.1L64.2 725.7 169.5 831z</Geometry>
@ -46,9 +44,6 @@
<Geometry x:Key="Icon.Filter">M599.22969 424.769286 599.22969 657.383158 424.769286 831.844585 424.769286 424.769286 192.155415 192.155415 831.844585 192.155415Z</Geometry>
<Geometry x:Key="Icon.Binary">M71.111111 1024V0h661.333333L952.888889 219.420444V1024H71.111111z m808.305778-731.420444l-220.444445-219.448889H144.583111V950.897778h734.833778V292.579556zM438.528 512h-220.444444V219.420444h220.444444V512z m-73.500444-219.420444H291.555556v146.289777h73.472v-146.289777z m0 512h73.500444v73.130666h-220.444444v-73.130666H291.555556v-146.289778H218.083556V585.102222h146.944v219.448889z m293.944888-365.710223h73.472V512H512v-73.130667h73.472v-146.289777H512V219.420444h146.972444v219.448889z m73.472 438.840889H512V585.130667h220.444444v292.579555z m-73.472-219.420444h-73.500444v146.289778h73.500444v-146.289778z</Geometry>
<Geometry x:Key="Icon.Vertical">M64 146.304c0-45.482667 36.821333-82.304 82.304-82.304H877.653333c45.482667 0 82.304 36.821333 82.304 82.304V877.653333a82.304 82.304 0 0 1-82.304 82.304H146.346667A82.304 82.304 0 0 1 64 877.696V146.346667zM146.304 106.666667a39.637333 39.637333 0 0 0-39.637333 39.637333V877.653333c0 21.888 17.749333 39.637333 39.637333 39.637334H490.666667v-810.666667H146.304z m387.029333 0v810.666666h344.362667a39.637333 39.637333 0 0 0 39.637333-39.637333V146.346667a39.637333 39.637333 0 0 0-39.637333-39.637334H533.333333z</Geometry>
<Geometry x:Key="Icon.Horizontal">M64 146.304c0-45.482667 36.821333-82.304 82.304-82.304h731.434667c45.44 0 82.261333 36.821333 82.261333 82.304v731.434667a82.304 82.304 0 0 1-82.261333 82.261333H146.304A82.304 82.304 0 0 1 64 877.738667V146.304zM146.304 106.666667a39.637333 39.637333 0 0 0-39.637333 39.637333V490.666667h810.666666V146.304a39.637333 39.637333 0 0 0-39.594666-39.637333H146.304z m771.029333 426.666666h-810.666666v344.405334c0 21.888 17.749333 39.594667 39.637333 39.594666h731.434667a39.637333 39.637333 0 0 0 39.594666-39.594666V533.333333z</Geometry>
<Geometry x:Key="Icon.Fetch">M1024 896v128H0V704h128v192h768V704h128v192zM576 554.688L810.688 320 896 405.312l-384 384-384-384L213.312 320 448 554.688V0h128v554.688z</Geometry>
<Geometry x:Key="Icon.Pull">M432 0h160c26.6 0 48 21.4 48 48v336h175.4c35.6 0 53.4 43 28.2 68.2L539.4 756.6c-15 15-39.6 15-54.6 0L180.2 452.2c-25.2-25.2-7.4-68.2 28.2-68.2H384V48c0-26.6 21.4-48 48-48z m592 752v224c0 26.6-21.4 48-48 48H48c-26.6 0-48-21.4-48-48V752c0-26.6 21.4-48 48-48h293.4l98 98c40.2 40.2 105 40.2 145.2 0l98-98H976c26.6 0 48 21.4 48 48z m-248 176c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z m128 0c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z</Geometry>
<Geometry x:Key="Icon.Push">M592 768h-160c-26.6 0-48-21.4-48-48V384h-175.4c-35.6 0-53.4-43-28.2-68.2L484.6 11.4c15-15 39.6-15 54.6 0l304.4 304.4c25.2 25.2 7.4 68.2-28.2 68.2H640v336c0 26.6-21.4 48-48 48z m432-16v224c0 26.6-21.4 48-48 48H48c-26.6 0-48-21.4-48-48V752c0-26.6 21.4-48 48-48h272v16c0 61.8 50.2 112 112 112h160c61.8 0 112-50.2 112-112v-16h272c26.6 0 48 21.4 48 48z m-248 176c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z m128 0c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z</Geometry>

View file

@ -78,32 +78,6 @@
</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"
Style="{DynamicResource Style.Icon}"
Fill="{DynamicResource Brush.FG2}"
Data="{DynamicResource Icon.Vertical}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Icon" Property="Data" Value="{DynamicResource Icon.Horizontal}"/>
</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"/>
@ -145,12 +119,10 @@
<Grid Background="Transparent">
<Path
x:Name="Icon"
Height="12"
Width="12"
Height="{TemplateBinding Width}"
Width="{TemplateBinding Height}"
Style="{DynamicResource Style.Icon}"
Fill="Transparent"
Stroke="{DynamicResource Brush.FG1}"
StrokeThickness=".4"
Fill="{TemplateBinding Foreground}"
Data="{DynamicResource Icon.SplitVertical}"/>
</Grid>

View file

@ -50,16 +50,18 @@
<StackPanel Grid.Column="2" x:Name="textChangeOptions" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Width="26" Click="Go2Next" ToolTip="{StaticResource Text.Diff.Next}" Background="Transparent">
<Path Width="10" Data="{StaticResource Icon.MoveDown}"/>
<Path Width="10" Data="{StaticResource Icon.Down}"/>
</Button>
<Button Click="Go2Prev" ToolTip="{StaticResource Text.Diff.Prev}" Background="Transparent">
<Path Width="10" Data="{StaticResource Icon.MoveUp}"/>
<Path Width="10" Data="{StaticResource Icon.Up}"/>
</Button>
<ToggleButton
Margin="8,0,0,0"
Style="{StaticResource Style.ToggleButton.SplitDirection}"
Foreground="{StaticResource Brush.FG1}"
Width="12" Height="12"
ToolTip="{StaticResource Text.Diff.Mode}"
IsChecked="{Binding Source={x:Static sourcegit:App.Setting}, Path=UI.UseCombinedDiff, Mode=TwoWay}"
Checked="ChangeDiffMode" Unchecked="ChangeDiffMode"/>

View file

@ -201,13 +201,15 @@
<!-- Layout Switch -->
<ToggleButton
Style="{StaticResource Style.ToggleButton.Orientation}"
Style="{StaticResource Style.ToggleButton.SplitDirection}"
Foreground="{StaticResource Brush.FG2}"
Width="14" Height="14"
ToolTip="{StaticResource Text.Histories.DisplayMode}"
IsChecked="{Binding Source={x:Static sourcegit:App.Setting}, Path=UI.MoveCommitViewerRight, Mode=TwoWay}"
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
<!-- Tips to Histories Panel -->
<Button Margin="4,0" ToolTip="{StaticResource Text.Histories.Guide}" Background="Transparent" Click="OpenGuide">
<Button Margin="6,0" ToolTip="{StaticResource Text.Histories.Guide}" Background="Transparent" Click="OpenGuide">
<Path Data="{StaticResource Icon.Info}" Fill="{StaticResource Brush.FG2}"/>
</Button>

View file

@ -149,11 +149,11 @@
Orientation="Horizontal"
Margin="4,0">
<Button Click="MoveUp" ToolTip="{StaticResource Text.InteractiveRebase.MoveUp}">
<Path Width="12" Height="12" Data="{StaticResource Icon.MoveUp}"/>
<Path Width="12" Height="12" Data="{StaticResource Icon.Up}"/>
</Button>
<Button Click="MoveDown" ToolTip="{StaticResource Text.InteractiveRebase.MoveDown}" Margin="4,0,0,0">
<Path Width="12" Height="12" Data="{StaticResource Icon.MoveDown}"/>
<Path Width="12" Height="12" Data="{StaticResource Icon.Down}"/>
</Button>
</StackPanel>
</Grid>