浏览代码

Resize windows on Unix

miguel 7 年之前
父节点
当前提交
317250c743
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Terminal.Gui/Core.cs

+ 5 - 1
Terminal.Gui/Core.cs

@@ -1905,9 +1905,13 @@ namespace Terminal.Gui {
 
 
 		static void TerminalResized ()
 		static void TerminalResized ()
 		{
 		{
+			var full = new Rect (0, 0, Driver.Cols, Driver.Rows);
+			Driver.Clip = full;
 			foreach (var t in toplevels) {
 			foreach (var t in toplevels) {
-				t.Frame = new Rect (0, 0, Driver.Cols, Driver.Rows);
+				t.RelativeLayout (full);
+				t.LayoutSubviews ();
 			}
 			}
+			Refresh ();
 		}
 		}
 	}
 	}
 }
 }