style<Dashboard>: change style for tags & submodules toggle button

This commit is contained in:
leo 2020-12-14 13:54:07 +08:00
parent c6c9f62bdb
commit 0517142330
2 changed files with 32 additions and 4 deletions

View file

@ -4,9 +4,37 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}"> <ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid Background="Transparent"> <Grid Background="Transparent" Margin="4,0">
<ContentPresenter/> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Path
x:Name="ExpanderIcon"
Grid.Column="0"
Width="10" Height="10"
Style="{DynamicResource Style.Icon}"
Data="{DynamicResource Icon.Down}"
Fill="{DynamicResource Brush.FG2}"
RenderTransformOrigin=".5,.5">
<Path.RenderTransform>
<RotateTransform Angle="270"/>
</Path.RenderTransform>
</Path>
<ContentPresenter Grid.Column="1"/>
</Grid> </Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="ExpanderIcon" Property="RenderTransform">
<Setter.Value>
<RotateTransform Angle="0"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>

View file

@ -360,7 +360,7 @@
Grid.Row="6" Grid.Row="6"
Style="{StaticResource Style.ToggleButton.Expender}" Style="{StaticResource Style.ToggleButton.Expender}"
IsChecked="{Binding Source={x:Static source:App.Preference}, Path=UIShowTags, Mode=TwoWay}"> IsChecked="{Binding Source={x:Static source:App.Preference}, Path=UIShowTags, Mode=TwoWay}">
<Grid Margin="4,0,2,0"> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="16"/> <ColumnDefinition Width="16"/>
@ -427,7 +427,7 @@
Grid.Row="9" Grid.Row="9"
Style="{StaticResource Style.ToggleButton.Expender}" Style="{StaticResource Style.ToggleButton.Expender}"
IsChecked="False"> IsChecked="False">
<Grid Margin="4,0,2,0"> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="16"/> <ColumnDefinition Width="16"/>