Skip to content

Commit

Permalink
Use client size for top-level arrange.
Browse files Browse the repository at this point in the history
Fixes #23.
  • Loading branch information
grokys committed Aug 23, 2015
1 parent c90ffca commit 18682a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Perspex.Controls/TopLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ protected override Size ArrangeOverride(Size finalSize)
this.PlatformImpl.ClientSize = finalSize;
}

return base.ArrangeOverride(finalSize);
return base.ArrangeOverride(this.PlatformImpl.ClientSize);
}

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Tests/Perspex.Controls.UnitTests/TopLevelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public void Bounds_Should_Be_Set_After_Layout_Pass()
Locator.CurrentMutable.RegisterConstant(new LayoutManager(), typeof(ILayoutManager));

var impl = new Mock<ITopLevelImpl>();
impl.SetupProperty(x => x.ClientSize);
impl.SetupProperty(x => x.Resized);

var target = new TestTopLevel(impl.Object)
{
Expand Down

0 comments on commit 18682a7

Please sign in to comment.