mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-10 17:29:08 +00:00
update thumbnail style in PdfViewer
This commit is contained in:
@@ -11,6 +11,7 @@ public:
|
||||
DESKTOP = 1,
|
||||
EXPLORER = 2,
|
||||
};
|
||||
|
||||
static FocusedWindowType GetFocusedWindowType();
|
||||
static void SaveCurrentSelection();
|
||||
static UINT GetCurrentSelectionCount();
|
||||
|
@@ -0,0 +1,52 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style x:Key="ListBoxItemStyleNoFocusedBorder" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="Transparent" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
||||
<Condition Property="IsSelected" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="Transparent" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="True" />
|
||||
<Condition Property="IsSelected" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="Transparent" />
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="TextElement.Foreground" TargetName="Bd"
|
||||
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
@@ -12,9 +12,9 @@
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<local:PageIdToImageConverter x:Key="PageIdToImageConverter" />
|
||||
<Style x:Key="ListBoxItemStyleNoFocusedBorder" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||
</Style>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="ListBoxItemStyleNoFocusedBorder.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
@@ -44,7 +44,7 @@
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="1" Grid.Column="1" BorderThickness="1" BorderBrush="#FFE1E1E1">
|
||||
<Border x:Name="bbd" Grid.Row="1" Grid.Column="1" BorderThickness="1" BorderBrush="#FFE1E1E1">
|
||||
<Image>
|
||||
<Image.Source>
|
||||
<MultiBinding Converter="{StaticResource PageIdToImageConverter}">
|
||||
@@ -58,6 +58,13 @@
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="{Binding Mode=OneWay, Converter={StaticResource MathConverter}, ConverterParameter=@VALUE+1}" FontSize="14" />
|
||||
-->
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"
|
||||
Value="True">
|
||||
<Setter TargetName="bbd" Property="BorderBrush" Value="#FF0040FF" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
@@ -281,6 +281,7 @@ namespace QuickLook.Plugin.PDFViewer
|
||||
|
||||
ZoomFactor = newZoom;
|
||||
ReRenderCurrentPage();
|
||||
scrolling = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -74,6 +74,10 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="ListBoxItemStyleNoFocusedBorder.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="PdfViewerControl.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
@@ -7,15 +7,16 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:plugin="clr-namespace:QuickLook.Plugin"
|
||||
mc:Ignorable="d" x:Class="QuickLook.MainWindow" x:Name="mainWindow" AllowsTransparency="True" WindowStyle="None"
|
||||
mc:Ignorable="d" x:Class="QuickLook.MainWindow" x:Name="mainWindow"
|
||||
UseLayoutRounding="True"
|
||||
Topmost="True" d:DesignWidth="624" d:DesignHeight="700"
|
||||
MinWidth="275" MinHeight="150"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
x:ClassModifier="internal" Focusable="False" ShowActivated="False" ShowInTaskbar="False">
|
||||
x:ClassModifier="internal" Focusable="False"
|
||||
ShowActivated="False" ShowInTaskbar="False" WindowStyle="None"
|
||||
ResizeMode="CanResizeWithGrip" AllowsTransparency="True">
|
||||
<Window.Background>
|
||||
<SolidColorBrush Color="#BFFFFFFF" />
|
||||
<SolidColorBrush Color="#DFFFFFFF" />
|
||||
</Window.Background>
|
||||
<Border x:Name="windowBorder" BorderThickness="1" BorderBrush="#FF7B7B7B">
|
||||
<Grid>
|
||||
|
Reference in New Issue
Block a user