diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml index 18d272c..0b968f9 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml @@ -11,14 +11,14 @@ - - diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs index f33d99c..93ed08b 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs @@ -58,15 +58,18 @@ namespace QuickLook.Plugin.ImageViewer _imageSize = ImageFileHelper.GetImageSize(path) ?? Size.Empty; if (!_imageSize.IsEmpty) - context.SetPreferredSizeFit(_imageSize, 0.8); + context.SetPreferredSizeFit(_imageSize, 0.6); else - context.PreferredSize = new Size(1024, 768); + context.PreferredSize = new Size(800, 600); + + context.PreferredSize = new Size(context.PreferredSize.Width, context.PreferredSize.Height + 32); Directory.SetCurrentDirectory(App.AppPath); - context.TitlebarBlurVisibility = false; - context.TitlebarOverlap = false; + context.TitlebarBlurVisibility = true; + context.TitlebarOverlap = true; context.TitlebarAutoHide = false; + context.UseDarkTheme = true; } public void View(string path, ContextObject context) diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj index a7650a5..33fa89f 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj @@ -112,6 +112,7 @@ Always + diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Resources/background-b.png b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Resources/background-b.png new file mode 100644 index 0000000..efbd911 Binary files /dev/null and b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Resources/background-b.png differ diff --git a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml index 6d6dce9..2b5e8e1 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml +++ b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml @@ -27,6 +27,7 @@ VirtualizingPanel.IsVirtualizing="True" Width="150" SelectedIndex="0" Focusable="False" + Margin="0,32,0,0" Background="#00FFFFFF" ItemsSource="{Binding PageIds, ElementName=thisPdfViewer}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" BorderThickness="0,0,1,0" diff --git a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Plugin.cs b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Plugin.cs index 68638fc..3a0d2ed 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Plugin.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/Plugin.cs @@ -19,6 +19,7 @@ using System; using System.IO; using System.Runtime.ExceptionServices; using System.Text; +using System.Windows; using System.Windows.Threading; namespace QuickLook.Plugin.PDFViewer @@ -56,7 +57,12 @@ namespace QuickLook.Plugin.PDFViewer var desiredSize = PdfViewerControl.GetDesiredControlSizeByFirstPage(path); - context.SetPreferredSizeFit(desiredSize, 0.8); + context.SetPreferredSizeFit(desiredSize, 0.6); + + context.PreferredSize = new Size(context.PreferredSize.Width, context.PreferredSize.Height + 32); + + context.TitlebarBlurVisibility = true; + context.TitlebarOverlap = true; } public void View(string path, ContextObject context) diff --git a/QuickLook/ViewerWindow.xaml.cs b/QuickLook/ViewerWindow.xaml.cs index c6b21b2..a33f9d8 100644 --- a/QuickLook/ViewerWindow.xaml.cs +++ b/QuickLook/ViewerWindow.xaml.cs @@ -273,7 +273,7 @@ namespace QuickLook // otherwise, resize it and place it to the old window center. var oldCenterX = Left + Width / 2; - var oldCenterY = Visibility == Visibility.Visible ? Top + Height / 2 : screen.Top + screen.Height / 2; + var oldCenterY = Top + Height / 2; var newLeft = oldCenterX - size.Width / 2; var newTop = oldCenterY - size.Height / 2;