From: Jean-Philippe Bruyère Date: Sat, 6 Feb 2021 17:18:24 +0000 (+0100) Subject: debug TextBox bottom limit with margin X-Git-Tag: v0.9.5-beta~75 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=a573d0660f78788a18ac678ffff32f835192f9a7;p=jp%2Fcrow.git debug TextBox bottom limit with margin --- diff --git a/Crow/src/Widgets/Label.cs b/Crow/src/Widgets/Label.cs index 6033a6f4..bec38868 100644 --- a/Crow/src/Widgets/Label.cs +++ b/Crow/src/Widgets/Label.cs @@ -355,7 +355,7 @@ namespace Crow TextExtents extents; Span bytes = stackalloc byte[128]; - double y = cb.Y; + double y = 0; for (int i = 0; i < lines.Count; i++) { if (!cancelLinePrint (lineHeight, y, cb.Height)) { @@ -376,7 +376,7 @@ namespace Crow RectangleD lineRect = new RectangleD ( Width.IsFit && !Multiline ? cb.X : (int)getX (cb.Width, lines[i]) + cb.X, - y, lines[i].LengthInPixel, lineHeight); + y + cb.Top, lines[i].LengthInPixel, lineHeight); if (encodedBytes > 0) { gr.MoveTo (lineRect.X, lineRect.Y + fe.Ascent);