Преглед изворни кода

Fixes #389 Window layouting breaks when resizing. (#390)

Fixed #389 horizontal resizing issue. Vertical resizing was fine. Posting a complete code to verify these two situations.
BDisp пре 5 година
родитељ
комит
230b7ab70b
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      Terminal.Gui/Core.cs

+ 2 - 2
Terminal.Gui/Core.cs

@@ -1482,7 +1482,7 @@ namespace Terminal.Gui {
 		{
 			if (this != Application.Top) {
 				EnsureVisibleBounds (this, Frame.X, Frame.Y, out int nx, out int ny);
-				if (nx != Frame.X || ny != Frame.Y) {
+				if ((nx != Frame.X || ny != Frame.Y) && LayoutStyle != LayoutStyle.Computed) {
 					X = nx;
 					Y = ny;
 				}
@@ -1490,7 +1490,7 @@ namespace Terminal.Gui {
 				foreach (var top in Subviews) {
 					if (top is Toplevel) {
 						EnsureVisibleBounds ((Toplevel)top, top.Frame.X, top.Frame.Y, out int nx, out int ny);
-						if (nx != top.Frame.X || ny != top.Frame.Y) {
+						if ((nx != top.Frame.X || ny != top.Frame.Y) && top.LayoutStyle != LayoutStyle.Computed) {
 							top.X = nx;
 							top.Y = ny;
 						}