From 4fea60efbcc3108d72dd909048f1586f99f71ca4 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 26 Aug 2017 21:03:04 +0100 Subject: WinGui: Various improvements and fixes to the new summary tab. Revert tab order change. #833 --- win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs') diff --git a/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs b/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs index 744003698..5b0354576 100644 --- a/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/SummaryView.xaml.cs @@ -11,6 +11,7 @@ namespace HandBrakeWPF.Views { using System.Windows.Controls; using System.Windows.Input; + using System.Windows.Media; using HandBrakeWPF.ViewModels.Interfaces; @@ -42,5 +43,18 @@ namespace HandBrakeWPF.Views ((ISummaryViewModel)this.DataContext).SetPreviewControlVisibility(leftHalf, rightHalf); } } + + private void PreviewImage_OnMouseLeave(object sender, MouseEventArgs e) + { + HitTestResult result = VisualTreeHelper.HitTest(this.previewImage, e.GetPosition(this.previewImage)); + + if (result != null && result.VisualHit.GetType() == typeof(Image)) + { + e.Handled = true; + return; + } + + ((ISummaryViewModel)this.DataContext).SetPreviewControlVisibility(false, false); + } } } -- cgit v1.2.3