mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
Add reset zoom on double click for images
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright © 2018 Paddy Xu
|
||||
// Copyright © 2018 Paddy Xu
|
||||
//
|
||||
// This file is part of QuickLook program.
|
||||
//
|
||||
@@ -79,6 +79,7 @@ namespace QuickLook.Plugin.ImageViewer
|
||||
viewPanel.PreviewMouseWheel += ViewPanel_PreviewMouseWheel;
|
||||
viewPanel.MouseLeftButtonDown += ViewPanel_MouseLeftButtonDown;
|
||||
viewPanel.MouseMove += ViewPanel_MouseMove;
|
||||
viewPanel.MouseDoubleClick += ViewPanel_MouseDoubleClick;
|
||||
|
||||
viewPanel.ManipulationInertiaStarting += ViewPanel_ManipulationInertiaStarting;
|
||||
viewPanel.ManipulationStarting += ViewPanel_ManipulationStarting;
|
||||
@@ -341,6 +342,11 @@ namespace QuickLook.Plugin.ImageViewer
|
||||
_dragInitPos = temp;
|
||||
}
|
||||
|
||||
private void ViewPanel_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
DoZoomToFit();
|
||||
}
|
||||
|
||||
private void ViewPanel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (!_dragInitPos.HasValue)
|
||||
|
Reference in New Issue
Block a user