mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-03-01 01:00:27 +08:00
Fix styling issues in the Search Panel #1592
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.Search;assembly=ICSharpCode.AvalonEdit">
|
||||
|
||||
<!-- Colors for DropDownButton and SplitButton -->
|
||||
<SolidColorBrush x:Key="{ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}" Color="#FF0A246A" />
|
||||
<SolidColorBrush x:Key="{ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}" Color="#FFB6BDD2" />
|
||||
|
||||
<!-- Style and Template for DropDownButton -->
|
||||
<Style TargetType="{x:Type local:DropDownButton}">
|
||||
<!--<Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />-->
|
||||
<Setter Property="Control.Padding" Value="2,2,2,2" />
|
||||
<Setter Property="Border.BorderThickness" Value="1,1,1,1" />
|
||||
<Setter Property="Panel.Background" Value="Transparent" />
|
||||
<Setter Property="Border.BorderBrush" Value="Transparent" />
|
||||
<Setter Property="FrameworkElement.HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="FrameworkElement.VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Control.HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="Control.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate xmlns:s="clr-namespace:System;assembly=mscorlib" TargetType="local:DropDownButton">
|
||||
<Border Name="OuterBorder"
|
||||
Background="{TemplateBinding Panel.Background}"
|
||||
BorderBrush="{TemplateBinding Border.BorderBrush}"
|
||||
BorderThickness="{TemplateBinding Border.BorderThickness}"
|
||||
SnapsToDevicePixels="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ContentPresenter Margin="{TemplateBinding Control.Padding}"
|
||||
HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
|
||||
Content="{TemplateBinding ContentControl.Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
|
||||
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
||||
<!-- CaretDownSolid8 -->
|
||||
<TextBlock Width="6"
|
||||
Margin="0,2,2,2"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
||||
FontSize="6"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<!--<Trigger Property="UIElement.IsMouseOver" Value="True">
|
||||
<Setter TargetName="OuterBorder" Property="Border.BorderBrush" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}" />
|
||||
<Setter TargetName="OuterBorder" Property="Panel.Background" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}" />
|
||||
</Trigger>-->
|
||||
<!--<Trigger Property="UIElement.IsKeyboardFocused" Value="True">
|
||||
<Setter TargetName="OuterBorder" Property="Border.BorderBrush" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}" />
|
||||
<Setter TargetName="OuterBorder" Property="Panel.Background" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}" />
|
||||
</Trigger>-->
|
||||
<!--<Trigger Property="UIElement.IsEnabled" Value="False">
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
||||
</Trigger>-->
|
||||
<!--<Trigger Property="local:DropDownButton.IsDropDownContentOpen" Value="True">
|
||||
<Setter TargetName="OuterBorder" Property="Border.BorderBrush" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
|
||||
<Setter TargetName="OuterBorder" Property="Border.BorderThickness" Value="1,1,1,0" />
|
||||
<Setter TargetName="OuterBorder" Property="Border.Padding" Value="0,0,0,1" />
|
||||
<Setter TargetName="OuterBorder" Property="Panel.Background" Value="Transparent" />
|
||||
</Trigger>-->
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user