Skip to content

Commit

Permalink
Merge branch 'master' into fixes/selecteditems-binding
Browse files Browse the repository at this point in the history
  • Loading branch information
MarchingCube committed Apr 21, 2021
2 parents eeb7c8d + 4fbc06e commit a25a8cf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Avalonia.Controls/NativeControlHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private void UpdateHost()
private Rect? GetAbsoluteBounds()
{
var bounds = Bounds;
var position = this.TranslatePoint(bounds.Position, _currentRoot);
var position = this.TranslatePoint(default, _currentRoot);
if (position == null)
return null;
return new Rect(position.Value, bounds.Size);
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Controls/ScrollViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class ScrollViewer : ContentControl, IScrollable, IScrollAnchorProvider
public static readonly AttachedProperty<ScrollBarVisibility> HorizontalScrollBarVisibilityProperty =
AvaloniaProperty.RegisterAttached<ScrollViewer, Control, ScrollBarVisibility>(
nameof(HorizontalScrollBarVisibility),
ScrollBarVisibility.Hidden);
ScrollBarVisibility.Disabled);

/// <summary>
/// Defines the VerticalScrollBarMaximum property.
Expand Down
2 changes: 1 addition & 1 deletion tests/Avalonia.Controls.UnitTests/ScrollViewerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void CanHorizontallyScroll_Should_Track_HorizontalScrollBarVisibility()
target.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
target.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;

Assert.Equal(new[] { true, false, true }, values);
Assert.Equal(new[] { false, true }, values);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public async Task ScrollViewer_Determines_EffectiveViewport()
{
var root = CreateRoot();
var target = new Canvas { Width = 200, Height = 200 };
var scroller = new ScrollViewer { Width = 100, Height = 100, Content = target, Template = ScrollViewerTemplate() };
var scroller = new ScrollViewer { Width = 100, Height = 100, Content = target, Template = ScrollViewerTemplate(), HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden };
var raised = 0;
target.EffectiveViewportChanged += (s, e) =>
Expand All @@ -185,7 +185,7 @@ public async Task Scrolled_ScrollViewer_Determines_EffectiveViewport()
{
var root = CreateRoot();
var target = new Canvas { Width = 200, Height = 200 };
var scroller = new ScrollViewer { Width = 100, Height = 100, Content = target, Template = ScrollViewerTemplate() };
var scroller = new ScrollViewer { Width = 100, Height = 100, Content = target, Template = ScrollViewerTemplate(), HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden };
var raised = 0;
root.Child = scroller;
Expand Down

0 comments on commit a25a8cf

Please sign in to comment.