diff --git a/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs b/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs index f37e0f8701..063ad50b0b 100644 --- a/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs +++ b/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs @@ -345,7 +345,7 @@ namespace ControlCatalog.Pages 0.01f, 1000); - var view = Matrix4x4.CreateLookAt(new Vector3(25, 25, 25), new Vector3(), new Vector3(0, -1, 0)); + var view = Matrix4x4.CreateLookAt(new Vector3(25, 25, 25), new Vector3(), new Vector3(0, 1, 0)); var model = Matrix4x4.CreateFromYawPitchRoll(_yaw, _pitch, _roll); var modelLoc = GL.GetUniformLocationString(_shaderProgram, "uModel"); var viewLoc = GL.GetUniformLocationString(_shaderProgram, "uView"); diff --git a/src/Avalonia.Controls/AutoCompleteBox.cs b/src/Avalonia.Controls/AutoCompleteBox.cs index 5c95932c1f..c675139831 100644 --- a/src/Avalonia.Controls/AutoCompleteBox.cs +++ b/src/Avalonia.Controls/AutoCompleteBox.cs @@ -392,6 +392,8 @@ namespace Avalonia.Controls private AutoCompleteSelector? _itemSelector; private AutoCompleteSelector? _textSelector; + private readonly EventHandler _populateDropDownHandler; + public static readonly RoutedEvent SelectionChangedEvent = RoutedEvent.Register(nameof(SelectionChanged), RoutingStrategies.Bubble, typeof(AutoCompleteBox)); @@ -668,6 +670,7 @@ namespace Avalonia.Controls if (newValue == TimeSpan.Zero) { + _delayTimer.Tick -= _populateDropDownHandler; _delayTimer = null; } } @@ -678,7 +681,7 @@ namespace Avalonia.Controls if (_delayTimer == null) { _delayTimer = new DispatcherTimer(); - _delayTimer.Tick += PopulateDropDown; + _delayTimer.Tick += _populateDropDownHandler; } // Set the new tick interval @@ -864,6 +867,7 @@ namespace Avalonia.Controls /// public AutoCompleteBox() { + _populateDropDownHandler = PopulateDropDown; ClearView(); } @@ -1771,10 +1775,7 @@ namespace Avalonia.Controls /// The event arguments. private void PopulateDropDown(object? sender, EventArgs e) { - if (_delayTimer != null) - { - _delayTimer.Stop(); - } + _delayTimer?.Stop(); // Update the prefix/search text. SearchText = Text; diff --git a/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs b/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs index a4617bb4d5..fb69a1ad3d 100644 --- a/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs +++ b/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs @@ -41,7 +41,7 @@ namespace Avalonia.Skia new GRGlTextureInfo( GlConsts.GL_TEXTURE_2D, (uint)_surface.GetTextureId(), (uint)_surface.InternalFormat))) - using (var surface = SKSurface.Create(context.GrContext, backendTexture, GRSurfaceOrigin.TopLeft, + using (var surface = SKSurface.Create(context.GrContext, backendTexture, GRSurfaceOrigin.BottomLeft, SKColorType.Rgba8888)) { // Again, silently ignore, if something went wrong it's not our fault