Removed AutoSize from MessageBox

This commit is contained in:
Tig
2024-05-03 13:04:34 -06:00
parent 2e62263b69
commit 89e1db3664
3 changed files with 6 additions and 9 deletions

View File

@@ -214,7 +214,6 @@ public class DatePicker : View
_previousMonthButton = new Button
{
AutoSize = false,
X = Pos.Center () - 2,
Y = Pos.Bottom (_calendar) - 1,
Height = 1,
@@ -234,7 +233,6 @@ public class DatePicker : View
_nextMonthButton = new Button
{
AutoSize = false,
X = Pos.Right (_previousMonthButton) + 2,
Y = Pos.Bottom (_calendar) - 1,
Height = 1,

View File

@@ -369,14 +369,13 @@ public static class MessageBox
var messageLabel = new Label
{
AutoSize = !wrapMessage,
Text = message,
TextAlignment = TextAlignment.Centered,
X = Pos.Center (),
Y = 0
};
if (!messageLabel.AutoSize)
if (!wrapMessage)
{
messageLabel.Width = Dim.Fill ();
messageLabel.Height = Dim.Fill (1);

View File

@@ -93,10 +93,10 @@ public class Wizard : Dialog
Add (separator);
// BUGBUG: Space is to work around https://github.com/gui-cs/Terminal.Gui/issues/1812
BackButton = new Button { AutoSize = true, Text = Strings.wzBack };
BackButton = new () { Text = Strings.wzBack };
AddButton (BackButton);
NextFinishButton = new Button { AutoSize = true, Text = Strings.wzFinish };
NextFinishButton = new () { Text = Strings.wzFinish };
NextFinishButton.IsDefault = true;
AddButton (NextFinishButton);
@@ -417,10 +417,10 @@ public class Wizard : Dialog
{
if (key == Key.Esc)
{
var args = new WizardButtonEventArgs ();
Cancelled?.Invoke (this, args);
var args = new WizardButtonEventArgs ();
Cancelled?.Invoke (this, args);
return false;
return false;
}
}