mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 09:47:58 +01:00
Removed AutoSize from MessageBox
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user