Skip to content

Commit 6be8ecb

Browse files
authored
Merge pull request #2748 from cwensley/curtis/drawtext-measure-height
2 parents 24a1be0 + 0fc01f2 commit 6be8ecb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/Eto.Test/Sections/Drawing/DrawTextSection.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public DrawTextSection()
1919

2020
Control Default()
2121
{
22-
var control = new Drawable { Size = new Size(400, 500), BackgroundColor = Colors.Black };
22+
var control = new Drawable { Width = 400, BackgroundColor = Colors.Black };
23+
var height = GetDrawInfo().Sum(r => r.Font.MeasureString(r.Text).Height);
24+
control.Height = (int)height;
2325
control.Paint += (sender, e) => DrawFrame(e.Graphics);
2426
return control;
2527
}

0 commit comments

Comments
 (0)