mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-25 02:00:12 +08:00
Fix styling issues in the Search Panel #1592
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:search="clr-namespace:ICSharpCode.AvalonEdit.Search;assembly=ICSharpCode.AvalonEdit">
|
||||
|
||||
<Style TargetType="search:SearchPanel">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type search:SearchPanel}">
|
||||
<!-- For compatibility, the Card itself is not used for the time being. -->
|
||||
<!-- Background="{DynamicResource CardBackgroundBrush}" -->
|
||||
<!-- BorderBrush="{DynamicResource CardBorderBrush}" -->
|
||||
<Border Margin="0,-1,16,0"
|
||||
Padding="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="{DynamicResource WindowBackground}"
|
||||
BorderBrush="#102E2E3E"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Cursor="Arrow">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Name="PART_searchTextBox"
|
||||
Width="150"
|
||||
Height="29"
|
||||
Padding="4,5,0,0"
|
||||
FocusVisualStyle="{x:Null}"
|
||||
Focusable="True">
|
||||
<TextBox.Text>
|
||||
<Binding Path="SearchPattern"
|
||||
RelativeSource="{RelativeSource TemplatedParent}"
|
||||
UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<ExceptionValidationRule />
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
<search:DropDownButton Height="24">
|
||||
<search:DropDownButton.DropDownContent>
|
||||
<Popup Name="PART_dropdownPopup"
|
||||
AllowsTransparency="True"
|
||||
StaysOpen="False">
|
||||
<Border Background="{DynamicResource WindowBackground}"
|
||||
BorderBrush="{DynamicResource CardBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<CheckBox Margin="3"
|
||||
Content="{Binding Localization.MatchCaseText, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
IsChecked="{Binding MatchCase, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<CheckBox Margin="3"
|
||||
Content="{Binding Localization.MatchWholeWordsText, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
IsChecked="{Binding WholeWords, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<CheckBox Margin="3"
|
||||
Content="{Binding Localization.UseRegexText, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
IsChecked="{Binding UseRegex, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
</search:DropDownButton.DropDownContent>
|
||||
</search:DropDownButton>
|
||||
<Button Width="24"
|
||||
Height="24"
|
||||
Margin="3,3,0,3"
|
||||
Padding="0"
|
||||
Command="search:SearchCommands.FindPrevious"
|
||||
ToolTip="{Binding Localization.FindPreviousText, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<!-- ChevronUp -->
|
||||
<TextBlock HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="12"
|
||||
Text="" />
|
||||
</Button>
|
||||
<Button Width="24"
|
||||
Height="24"
|
||||
Margin="3"
|
||||
Padding="0"
|
||||
Command="search:SearchCommands.FindNext"
|
||||
ToolTip="{Binding Localization.FindNextText, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<!-- ChevronDown -->
|
||||
<TextBlock HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="12"
|
||||
Text="" />
|
||||
</Button>
|
||||
<Button Width="16"
|
||||
Height="16"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Command="search:SearchCommands.CloseSearchPanel"
|
||||
Focusable="False">
|
||||
<!-- CalculatorMultiply -->
|
||||
<TextBlock HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="10"
|
||||
Text="" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user