From 36fd57e9552a1a5ca7eea84a30ee47463ed05d99 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Tue, 14 Apr 2020 22:19:26 +0200 Subject: [PATCH] fix(Slider): macOS vertical thumb movement is flipped --- src/Uno.UI/UI/Xaml/Input/PointerRoutedEventArgs.macOS.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI/UI/Xaml/Input/PointerRoutedEventArgs.macOS.cs b/src/Uno.UI/UI/Xaml/Input/PointerRoutedEventArgs.macOS.cs index 117aedb76dfd..3483acf4ddd3 100644 --- a/src/Uno.UI/UI/Xaml/Input/PointerRoutedEventArgs.macOS.cs +++ b/src/Uno.UI/UI/Xaml/Input/PointerRoutedEventArgs.macOS.cs @@ -7,6 +7,7 @@ using Windows.System; using Foundation; using Windows.UI.Input; +using CoreGraphics; namespace Windows.UI.Xaml.Input { @@ -48,7 +49,7 @@ public PointerPoint GetCurrentPoint(UIElement relativeTo) var rawPosition = _nativeEvent.LocationInWindow; var position = relativeTo != null ? relativeTo.ConvertPointFromView(_nativeEvent.LocationInWindow, null) : - rawPosition; + new CGPoint(rawPosition.X, Window.Current.Bounds.Height - rawPosition.Y); //flip Y - uses lower-left as origin and IsFlipped does not apply here var properties = new PointerPointProperties() {