mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
143 lines
8.2 KiB
XML
143 lines
8.2 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<!-- only for design -->
|
|
<ResourceDictionary Source="/QuickLook;component/Styles/MainWindowStyles.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<Style x:Key="ControlButtonStyle" TargetType="Button" BasedOn="{StaticResource CaptionButtonStyle}">
|
|
<Setter Property="Width" Value="32" />
|
|
</Style>
|
|
|
|
<!-- Postion Slider Control -->
|
|
<ControlTemplate x:Key="PositionSliderThumbTemplate" TargetType="{x:Type Thumb}">
|
|
<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
|
|
<Path x:Name="grip" Data="M 0,0 A 180,180 180 1 1 1,1 Z" Fill="Transparent" Stretch="Fill"
|
|
Stroke="{DynamicResource WindowTextForeground}" StrokeThickness="1" UseLayoutRounding="True"
|
|
VerticalAlignment="Center"
|
|
Margin="-1,-1" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="grip" Value="{DynamicResource WindowTextForeground}" />
|
|
<Setter Property="Stroke" TargetName="grip" Value="{DynamicResource WindowTextForeground}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Visibility" TargetName="grip" Value="Hidden" />
|
|
</Trigger>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter Property="Fill" TargetName="grip" Value="{DynamicResource WindowTextForeground}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
<ControlTemplate x:Key="PositionSliderTemplate" TargetType="{x:Type Slider}">
|
|
<Border x:Name="border" Background="Transparent" SnapsToDevicePixels="True">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="{TemplateBinding MinHeight}" />
|
|
</Grid.RowDefinitions>
|
|
<DockPanel LastChildFill="True">
|
|
<Border ClipToBounds="True" x:Name="PART_SelectionRange" Height="1" Visibility="Visible">
|
|
<Rectangle RadiusX="1" RadiusY="1" Margin="10,0,-10,0"
|
|
Fill="{DynamicResource WindowTextForeground}" />
|
|
</Border>
|
|
<Border ClipToBounds="True" Height="1" Visibility="Visible">
|
|
<Rectangle RadiusX="1" RadiusY="1" Margin="10,0,10,0"
|
|
Fill="{DynamicResource WindowTextForegroundAlternative}" />
|
|
</Border>
|
|
</DockPanel>
|
|
<Track x:Name="PART_Track">
|
|
<Track.Thumb>
|
|
<Thumb x:Name="Thumb" Focusable="False" Width="{TemplateBinding MinHeight}"
|
|
Height="{TemplateBinding MinHeight}"
|
|
OverridesDefaultStyle="True" Template="{StaticResource PositionSliderThumbTemplate}"
|
|
VerticalAlignment="Center" />
|
|
</Track.Thumb>
|
|
</Track>
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
<Style x:Key="PositionSliderStyle" TargetType="{x:Type Slider}">
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="MinHeight" Value="10" />
|
|
<Setter Property="MaxHeight" Value="10" />
|
|
<Setter Property="Height" Value="10" />
|
|
<Setter Property="Minimum" Value="0" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="AutoToolTipPlacement" Value="None" />
|
|
<Setter Property="IsMoveToPointEnabled" Value="True" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="SelectionStart" Value="0" />
|
|
<Setter Property="SelectionEnd" Value="{Binding Path=Value, RelativeSource={RelativeSource Self}}" />
|
|
<Setter Property="Template" Value="{StaticResource PositionSliderTemplate}" />
|
|
</Style>
|
|
|
|
<!-- Custom Slider Control -->
|
|
<ControlTemplate x:Key="CustomSliderThumbTemplate" TargetType="{x:Type Thumb}">
|
|
<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
|
|
<Rectangle x:Name="grip" Fill="{DynamicResource WindowTextForeground}" Width="5"
|
|
Height="{Binding Path=Height, RelativeSource={RelativeSource TemplatedParent}}"
|
|
StrokeThickness="0"
|
|
UseLayoutRounding="True" Stretch="Fill" RadiusX="3" RadiusY="3" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="grip" Value="{DynamicResource WindowTextForeground}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="grip" Value="{DynamicResource MainWindowBackground}" />
|
|
</Trigger>
|
|
<Trigger Property="IsKeyboardFocused" Value="False">
|
|
<Setter Property="Fill" TargetName="grip" Value="{DynamicResource WindowTextForeground}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
<ControlTemplate x:Key="CustomSliderTemplate" TargetType="{x:Type Slider}">
|
|
<Border x:Name="border" Background="Transparent" SnapsToDevicePixels="True">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="{TemplateBinding MinHeight}" />
|
|
</Grid.RowDefinitions>
|
|
<DockPanel LastChildFill="True">
|
|
<Border ClipToBounds="True" x:Name="PART_SelectionRange" Height="1" Visibility="Visible">
|
|
<Rectangle RadiusX="1" RadiusY="1" Margin="4,0,-2,0"
|
|
Fill="{DynamicResource WindowTextForeground}" />
|
|
</Border>
|
|
<Border ClipToBounds="True" Height="1" Visibility="Visible">
|
|
<Rectangle x:Name="PART_NegativeSelection" RadiusX="1" RadiusY="1" Margin="-2,0,4,0"
|
|
Fill="{DynamicResource WindowTextForegroundAlternative}" />
|
|
</Border>
|
|
</DockPanel>
|
|
<Track x:Name="PART_Track">
|
|
<Track.Thumb>
|
|
<Thumb x:Name="Thumb" Focusable="False" Width="5" Height="{TemplateBinding MinHeight}"
|
|
OverridesDefaultStyle="True" Template="{StaticResource CustomSliderThumbTemplate}"
|
|
VerticalAlignment="Center" />
|
|
</Track.Thumb>
|
|
</Track>
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
<Style x:Key="CustomSliderStyle" TargetType="{x:Type Slider}">
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="MinHeight" Value="14" />
|
|
<Setter Property="MaxHeight" Value="14" />
|
|
<Setter Property="Height" Value="14" />
|
|
<Setter Property="Minimum" Value="0" />
|
|
<Setter Property="IsSnapToTickEnabled" Value="True" />
|
|
<Setter Property="SmallChange" Value="0.01" />
|
|
<Setter Property="LargeChange" Value="0.01" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="TickFrequency" Value="0.01" />
|
|
<Setter Property="AutoToolTipPlacement" Value="None" />
|
|
<Setter Property="IsMoveToPointEnabled" Value="True" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="SelectionStart" Value="{Binding Path=Minimum, RelativeSource={RelativeSource Self}}" />
|
|
<Setter Property="SelectionEnd" Value="{Binding Path=Value, RelativeSource={RelativeSource Self}}" />
|
|
<Setter Property="Template" Value="{StaticResource CustomSliderTemplate}" />
|
|
</Style>
|
|
</ResourceDictionary> |