Browse Source

Merge branch 'master' into fixes/Controls/Calendar

pull/8716/head
Max Katz 4 years ago
committed by GitHub
parent
commit
d18eade2d8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      samples/ControlCatalog/Pages/OpenGlPage.xaml.cs
  2. 11
      src/Avalonia.Controls/AutoCompleteBox.cs
  3. 2
      src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs

2
samples/ControlCatalog/Pages/OpenGlPage.xaml.cs

@ -345,7 +345,7 @@ namespace ControlCatalog.Pages
0.01f, 1000); 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 model = Matrix4x4.CreateFromYawPitchRoll(_yaw, _pitch, _roll);
var modelLoc = GL.GetUniformLocationString(_shaderProgram, "uModel"); var modelLoc = GL.GetUniformLocationString(_shaderProgram, "uModel");
var viewLoc = GL.GetUniformLocationString(_shaderProgram, "uView"); var viewLoc = GL.GetUniformLocationString(_shaderProgram, "uView");

11
src/Avalonia.Controls/AutoCompleteBox.cs

@ -392,6 +392,8 @@ namespace Avalonia.Controls
private AutoCompleteSelector<object>? _itemSelector; private AutoCompleteSelector<object>? _itemSelector;
private AutoCompleteSelector<string?>? _textSelector; private AutoCompleteSelector<string?>? _textSelector;
private readonly EventHandler _populateDropDownHandler;
public static readonly RoutedEvent<SelectionChangedEventArgs> SelectionChangedEvent = public static readonly RoutedEvent<SelectionChangedEventArgs> SelectionChangedEvent =
RoutedEvent.Register<SelectionChangedEventArgs>(nameof(SelectionChanged), RoutingStrategies.Bubble, typeof(AutoCompleteBox)); RoutedEvent.Register<SelectionChangedEventArgs>(nameof(SelectionChanged), RoutingStrategies.Bubble, typeof(AutoCompleteBox));
@ -668,6 +670,7 @@ namespace Avalonia.Controls
if (newValue == TimeSpan.Zero) if (newValue == TimeSpan.Zero)
{ {
_delayTimer.Tick -= _populateDropDownHandler;
_delayTimer = null; _delayTimer = null;
} }
} }
@ -678,7 +681,7 @@ namespace Avalonia.Controls
if (_delayTimer == null) if (_delayTimer == null)
{ {
_delayTimer = new DispatcherTimer(); _delayTimer = new DispatcherTimer();
_delayTimer.Tick += PopulateDropDown; _delayTimer.Tick += _populateDropDownHandler;
} }
// Set the new tick interval // Set the new tick interval
@ -864,6 +867,7 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
public AutoCompleteBox() public AutoCompleteBox()
{ {
_populateDropDownHandler = PopulateDropDown;
ClearView(); ClearView();
} }
@ -1771,10 +1775,7 @@ namespace Avalonia.Controls
/// <param name="e">The event arguments.</param> /// <param name="e">The event arguments.</param>
private void PopulateDropDown(object? sender, EventArgs e) private void PopulateDropDown(object? sender, EventArgs e)
{ {
if (_delayTimer != null) _delayTimer?.Stop();
{
_delayTimer.Stop();
}
// Update the prefix/search text. // Update the prefix/search text.
SearchText = Text; SearchText = Text;

2
src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs

@ -41,7 +41,7 @@ namespace Avalonia.Skia
new GRGlTextureInfo( new GRGlTextureInfo(
GlConsts.GL_TEXTURE_2D, (uint)_surface.GetTextureId(), GlConsts.GL_TEXTURE_2D, (uint)_surface.GetTextureId(),
(uint)_surface.InternalFormat))) (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)) SKColorType.Rgba8888))
{ {
// Again, silently ignore, if something went wrong it's not our fault // Again, silently ignore, if something went wrong it's not our fault

Loading…
Cancel
Save