Browse Source

Fixed Vertical FormatAndGetSize Fill issue

Tig 1 năm trước cách đây
mục cha
commit
b528ba8bc7
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      Terminal.Gui/Text/TextFormatter.cs

+ 6 - 0
Terminal.Gui/Text/TextFormatter.cs

@@ -670,11 +670,17 @@ public class TextFormatter
         {
             Alignment = Alignment.Start;
         }
+        Alignment prevVerticalAlignment = VerticalAlignment;
+        if (VerticalAlignment == Alignment.Fill)
+        {
+            VerticalAlignment = Alignment.Start;
+        }
 
         List<string> lines = GetLines ();
 
         // Undo hacks
         Alignment = prevAlignment;
+        VerticalAlignment = prevVerticalAlignment;
         Size = prevSize;
 
         if (lines.Count == 0)