Skip to content

Commit

Permalink
Apply margin before width/height.
Browse files Browse the repository at this point in the history
Fixes #993.
  • Loading branch information
grokys committed May 25, 2017
1 parent 15c3ef4 commit 16a47da
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Avalonia.Layout/Layoutable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,9 @@ protected virtual Size MeasureCore(Size availableSize)

ApplyTemplate();

var constrained = LayoutHelper
.ApplyLayoutConstraints(this, availableSize)
.Deflate(margin);

var constrained = LayoutHelper.ApplyLayoutConstraints(
this,
availableSize.Deflate(margin));
var measured = MeasureOverride(constrained);

var width = measured.Width;
Expand Down

0 comments on commit 16a47da

Please sign in to comment.