소스 검색

StatusBar fix when vertical shrinking.

BDisp 5 년 전
부모
커밋
2fc77b18c5
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      Terminal.Gui/Core/Toplevel.cs

+ 5 - 4
Terminal.Gui/Core/Toplevel.cs

@@ -353,15 +353,16 @@ namespace Terminal.Gui {
 					top.Y = ny;
 				}
 			}
-			if (StatusBar != null) {
+			if (top.StatusBar != null) {
 				if (ny + top.Frame.Height > top.Frame.Height - 1) {
 					if (top.Height is Dim.DimFill)
 						top.Height = Dim.Fill () - 1;
 				}
-				if (StatusBar.Frame.Y != Frame.Height - 1) {
-					StatusBar.Y = Frame.Height - 1;
-					SetNeedsDisplay ();
+				if (top.StatusBar.Frame.Y != top.Frame.Height - 1) {
+					top.StatusBar.Y = top.Frame.Height - 1;
+					top.LayoutSubviews ();
 				}
+				top.BringSubviewToFront (top.StatusBar);
 			}
 		}