Browse Source

Merge pull request #630 from tig/move_pos_init_to_constructor

move the pos init to constructor
Charlie Kindel 5 years ago
parent
commit
21f7086ea3
2 changed files with 4 additions and 4 deletions
  1. 4 2
      Terminal.Gui/Core/View.cs
  2. 0 2
      UICatalog/UICatalog.cs

+ 4 - 2
Terminal.Gui/Core/View.cs

@@ -285,8 +285,8 @@ namespace Terminal.Gui {
 			}
 		}
 
-		Pos x = Pos.At (0);
-		Pos y = Pos.At (0);
+		Pos x, y;
+
 		/// <summary>
 		/// Gets or sets the X position for the view (the column). Only used whe <see cref="LayoutStyle"/> is <see cref="LayoutStyle.Computed"/>.
 		/// </summary>
@@ -383,6 +383,8 @@ namespace Terminal.Gui {
 		{
 			CanFocus = false;
 			LayoutStyle = LayoutStyle.Computed;
+			x = Pos.At (0);
+			y = Pos.At (0);
 			Height = 0;
 			Width = 0;
 		}

+ 0 - 2
UICatalog/UICatalog.cs

@@ -147,8 +147,6 @@ namespace UICatalog {
 			aboutMessage.AppendLine ($"Using Terminal.Gui Version: {typeof (Terminal.Gui.Application).Assembly.GetName ().Version}");
 			aboutMessage.AppendLine ("");
 
-
-			var framePaddingMenuText = "Diagnostics: _Frame Padding";
 			_menu = new MenuBar (new MenuBarItem [] {
 				new MenuBarItem ("_File", new MenuItem [] {
 					new MenuItem ("_Quit", "", () => Application.RequestStop() )