Browse Source

Cleaned up OnResizeNeeded (api docs and usages)

Tig Kindel 1 year ago
parent
commit
a740ef0a3b

+ 2 - 2
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -564,8 +564,8 @@ public partial class View {
 	}
 
 	/// <summary>
-	/// Called whenever the view needs to be resized. Sets <see cref="Frame"/> and triggers a <see cref="LayoutSubviews()"/>
-	/// call.
+	/// Called whenever the view needs to be resized. This is called whenever <see cref="Frame"/>,
+	/// <see cref="View.X"/>, <see cref="View.Y"/>, <see cref="View.Width"/>, or <see cref="View.Height"/> changes.
 	/// </summary>
 	/// <remarks>
 	///         <para>

+ 0 - 1
Terminal.Gui/View/View.cs

@@ -490,7 +490,6 @@ public partial class View : Responder, ISupportInitializeNotification {
 
 		Text = text == null ? string.Empty : text;
 		Frame = rect.IsEmpty ? TextFormatter.CalcRect (0, 0, text, direction) : rect;
-		OnResizeNeeded ();
 
 		AddCommands ();
 

+ 0 - 1
Terminal.Gui/View/ViewText.cs

@@ -36,7 +36,6 @@ public partial class View {
 			_text = value;
 			SetHotKey ();
 			UpdateTextFormatterText ();
-			//TextFormatter.Format ();
 			OnResizeNeeded ();
 
 #if DEBUG

+ 0 - 2
Terminal.Gui/Views/Button.cs

@@ -118,8 +118,6 @@ public class Button : View {
 		_isDefault = is_default;
 		Text = text ?? string.Empty;
 
-		OnResizeNeeded ();
-
 		// Override default behavior of View
 		// Command.Default sets focus
 		AddCommand (Command.Accept, () => { OnClicked (); return true; });

+ 0 - 2
Terminal.Gui/Views/CheckBox.cs

@@ -86,8 +86,6 @@ public class CheckBox : View {
 		AutoSize = true;
 		Text = s;
 
-		OnResizeNeeded ();
-
 		// Things this view knows how to do
 		AddCommand (Command.ToggleChecked, () => ToggleChecked ());
 		AddCommand (Command.Accept, () => {