From a573d0660f78788a18ac678ffff32f835192f9a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Sat, 6 Feb 2021 18:18:24 +0100 Subject: [PATCH] debug TextBox bottom limit with margin --- Crow/src/Widgets/Label.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.47.3