code_style: clean up unused styles

This commit is contained in:
leo 2024-08-22 21:46:06 +08:00
parent 38770af13d
commit c2549869ce
No known key found for this signature in database

View file

@ -534,28 +534,10 @@
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Top" VerticalAlignment="Top"
Padding="10"> Padding="10">
<Grid ColumnDefinitions="Auto,Auto,Auto" <Grid RowDefinitions="Auto,Auto">
RowDefinitions="Auto,Auto,Auto"> <StackPanel Grid.Row="0" Orientation="Horizontal">
<ToggleButton Name="Expander"
Theme="{StaticResource SearchPanelExpanderToggle}"
VerticalAlignment="Center"
IsVisible="{Binding !TextEditor.IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsReplaceMode, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Grid.Column="0"
Grid.Row="0"
Width="16"
Margin="0, 0, 5, 0">
<ToolTip.Tip>
<TextBlock Text="{x:Static ae:SR.SearchToggleReplace}" />
</ToolTip.Tip>
</ToggleButton>
<StackPanel Orientation="Horizontal"
Grid.Column="2"
Grid.Row="0">
<TextBox Watermark="{x:Static ae:SR.SearchLabel}" <TextBox Watermark="{x:Static ae:SR.SearchLabel}"
Name="PART_searchTextBox" Name="PART_searchTextBox"
Grid.Column="1"
Grid.Row="0"
Width="265" Height="28" Width="265" Height="28"
Margin="0,0,0,0" Margin="0,0,0,0"
CornerRadius="2" CornerRadius="2"
@ -564,39 +546,24 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<ToggleButton Theme="{StaticResource SearchPanelTextBoxButton}" <ToggleButton Theme="{StaticResource SearchPanelTextBoxButton}"
IsChecked="{Binding $parent[aes:SearchPanel].MatchCase, Mode=TwoWay}" IsChecked="{Binding $parent[aes:SearchPanel].MatchCase, Mode=TwoWay}"
ToolTip.Tip="{x:Static ae:SR.SearchMatchCaseText}" ToolTip.Tip="Match case"
Width="24" Height="20" Width="24" Height="20"
VerticalAlignment="Center"> VerticalAlignment="Center">
<Path Data="{StaticResource CaseSensitiveIconPath}" <Path Width="12" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" Data="{StaticResource CaseSensitiveIconPath}" Fill="{DynamicResource Brush.FG1}"/>
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="12"
Fill="{DynamicResource Brush.FG1}"/>
</ToggleButton> </ToggleButton>
<ToggleButton Theme="{StaticResource SearchPanelTextBoxButton}" <ToggleButton Theme="{StaticResource SearchPanelTextBoxButton}"
IsChecked="{Binding $parent[aes:SearchPanel].WholeWords, Mode=TwoWay}" IsChecked="{Binding $parent[aes:SearchPanel].WholeWords, Mode=TwoWay}"
ToolTip.Tip="{x:Static ae:SR.SearchMatchWholeWordsText}" ToolTip.Tip="Match whole words"
Margin="3,0,0,0" Width="24" Height="20" Margin="3,0,0,0" Width="24" Height="20"
VerticalAlignment="Center"> VerticalAlignment="Center">
<Path Data="{StaticResource CompleteWordIconPath}" <Path Width="14" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" Data="{StaticResource CompleteWordIconPath}" Fill="{DynamicResource Brush.FG1}"/>
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="14"
Fill="{DynamicResource Brush.FG1}"/>
</ToggleButton> </ToggleButton>
<ToggleButton Theme="{StaticResource SearchPanelTextBoxButton}" <ToggleButton Theme="{StaticResource SearchPanelTextBoxButton}"
IsChecked="{Binding $parent[aes:SearchPanel].UseRegex, Mode=TwoWay}" IsChecked="{Binding $parent[aes:SearchPanel].UseRegex, Mode=TwoWay}"
ToolTip.Tip="{x:Static ae:SR.SearchUseRegexText}" ToolTip.Tip="Use regular expressions"
Margin="3,0,5,0" Width="24" Height="20" Margin="3,0,5,0" Width="24" Height="20"
VerticalAlignment="Center"> VerticalAlignment="Center">
<Path Data="{StaticResource RegularExpressionIconPath}" <Path Width="12" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" Data="{StaticResource RegularExpressionIconPath}" Fill="{DynamicResource Brush.FG1}"/>
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="12"
Fill="{DynamicResource Brush.FG1}"/>
</ToggleButton> </ToggleButton>
</StackPanel> </StackPanel>
</TextBox.InnerRightContent> </TextBox.InnerRightContent>
@ -605,84 +572,20 @@
Width="28" Width="28"
Background="Transparent" Background="Transparent"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Command="{x:Static aes:SearchCommands.FindPrevious}"> Command="{x:Static aes:SearchCommands.FindPrevious}"
<ToolTip.Tip> ToolTip.Tip="Find Previous (Shift+F3)">
<TextBlock Text="{x:Static ae:SR.SearchFindPreviousText}" /> <Path Width="14" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" Data="{StaticResource Icons.Up}" Fill="{DynamicResource Brush.FG1}"/>
</ToolTip.Tip>
<Path Data="{StaticResource Icons.Up}"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="14"
Fill="{DynamicResource Brush.FG1}"/>
</Button> </Button>
<Button Margin="3,0,0,0" <Button Margin="3,0,0,0"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Width="28" Width="28"
Background="Transparent" Background="Transparent"
Command="{x:Static aes:SearchCommands.FindNext}"> Command="{x:Static aes:SearchCommands.FindNext}"
<ToolTip.Tip> ToolTip.Tip="Find Next (F3)">
<TextBlock Text="{x:Static ae:SR.SearchFindNextText}" /> <Path Width="14" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" Data="{StaticResource Icons.Down}" Fill="{DynamicResource Brush.FG1}"/>
</ToolTip.Tip>
<Path Data="{StaticResource Icons.Down}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Width="14"
Fill="{DynamicResource Brush.FG1}"/>
</Button> </Button>
</StackPanel> </StackPanel>
<StackPanel Name="ReplaceButtons" <StackPanel Grid.Row="1" Name="PART_MessageView" IsVisible="False" Orientation="Horizontal" Margin="0 5 0 0">
IsVisible="{Binding #Expander.IsChecked}"
Orientation="Horizontal"
Margin="0 5 0 0 "
Grid.Column="2"
Grid.Row="1">
<TextBox Name="ReplaceBox" Watermark="{x:Static ae:SR.ReplaceLabel}"
IsVisible="{Binding IsReplaceMode, RelativeSource={RelativeSource TemplatedParent}}"
Grid.Column="1"
Grid.Row="1"
Width="265" Height="28"
Margin="0 0 0 0"
CornerRadius="2"
Text="{Binding ReplacePattern, RelativeSource={RelativeSource TemplatedParent}}" />
<Button Margin="5, 0, 0, 0"
VerticalAlignment="Stretch"
Width="28"
Background="Transparent"
Command="{x:Static aes:SearchCommands.ReplaceNext}">
<ToolTip.Tip>
<TextBlock Text="{x:Static ae:SR.SearchReplaceNext}" />
</ToolTip.Tip>
<Path Data="{StaticResource ReplaceNextIconPath}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Width="12"
Fill="{DynamicResource Brush.FG1}"/>
</Button>
<Button Margin="3, 0, 0, 0"
VerticalAlignment="Stretch"
Width="28"
Background="Transparent"
Command="{x:Static aes:SearchCommands.ReplaceAll}">
<ToolTip.Tip>
<TextBlock Text="{x:Static ae:SR.SearchReplaceAll}" />
</ToolTip.Tip>
<Path Data="{StaticResource ReplaceAllIconPath}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="Uniform"
Width="18"
Fill="{DynamicResource Brush.FG1}" />
</Button>
</StackPanel>
<StackPanel Name="PART_MessageView"
IsVisible="False"
Orientation="Horizontal"
Margin="0 5 0 0"
Grid.Column="2"
Grid.Row="2">
<TextBlock Name="PART_MessageContent" FontSize="11" /> <TextBlock Name="PART_MessageContent" FontSize="11" />
</StackPanel> </StackPanel>
</Grid> </Grid>