Skip to content

Commit

Permalink
Review fixes (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Aug 10, 2020
1 parent d85f223 commit 6144961
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/WpfMath.Tests/OverUnderBoxTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ type OverUnderBoxTests() =
Mock.Verify(<@ mockedRenderer.RenderTransformed(delimiterBox, any(), any(), any()) @>, once)

[<Fact>]
member _.``OverUnderBox should be successfully constructed a box for over == false and scriptBox == null``() =
member _.``OverUnderBox should be successfully constructed for over = false and scriptBox = null``() =
OverUnderBox(baseBox, delimiterBox, null, 0.0, false) |> ignore
6 changes: 3 additions & 3 deletions src/WpfMath/Boxes/OverUnderBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public OverUnderBox(Box baseBox, Box delimiterBox, Box scriptBox, double kern, b

// Calculate dimensions of box.
this.Width = baseBox.Width;
this.Height = baseBox.Height + (over ? delimiterBox.Width : 0) +
(over && scriptBox != null ? scriptBox.Height + scriptBox.Depth + kern : 0);
this.Depth = baseBox.Depth + (over ? 0 : delimiterBox.Width) +
this.Height = baseBox.Height + (over ? delimiterBox.Width : 0.0) +
(over && scriptBox != null ? scriptBox.Height + scriptBox.Depth + kern : 0.0);
this.Depth = baseBox.Depth + (over ? 0.0 : delimiterBox.Width) +
(!over && scriptBox != null ? scriptBox.Height + scriptBox.Depth + kern : 0.0);
}

Expand Down

0 comments on commit 6144961

Please sign in to comment.