diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml
index 0c23591..4d5194b 100644
--- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml
+++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml
@@ -91,25 +91,34 @@
-
+
+
-
+
+
+
+
textMeta.Visibility = textMeta.Visibility == Visibility.Collapsed
? Visibility.Visible
@@ -162,6 +165,16 @@ public partial class ImagePanel : UserControl, INotifyPropertyChanged, IDisposab
}
}
+ public Visibility CopyIconVisibility
+ {
+ get => _copyIconVisibility;
+ set
+ {
+ _copyIconVisibility = value;
+ OnPropertyChanged();
+ }
+ }
+
public Visibility BackgroundVisibility
{
get => _backgroundVisibility;
@@ -274,6 +287,28 @@ public partial class ImagePanel : UserControl, INotifyPropertyChanged, IDisposab
public event PropertyChangedEventHandler PropertyChanged;
+ private void OnCopyOnClick(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ if (_source is not null)
+ {
+ Clipboard.SetImage(_source);
+ return;
+ }
+
+ if (viewPanelImage.Source is BitmapSource bitmapSource)
+ {
+ Clipboard.SetImage(bitmapSource);
+ return;
+ }
+ }
+ catch
+ {
+ ///
+ }
+ }
+
private void OnBackgroundColourOnClick(object sender, RoutedEventArgs e)
{
Theme = Theme == Themes.Dark ? Themes.Light : Themes.Dark;
@@ -499,7 +534,7 @@ public partial class ImagePanel : UserControl, INotifyPropertyChanged, IDisposab
Debug.WriteLine($"FireZoomChangedEvent fired: {Thread.CurrentThread.ManagedThreadId}");
- Dispatcher.BeginInvoke(new Action(() => ZoomChanged?.Invoke(this, new EventArgs())),
+ Dispatcher.BeginInvoke(new Action(() => ZoomChanged?.Invoke(this, EventArgs.Empty)),
DispatcherPriority.Background);
});
}