diff --git a/Terminal.Gui/Views/Dialog.cs b/Terminal.Gui/Views/Dialog.cs index 7644e1ec5..1d0aa8cd4 100644 --- a/Terminal.Gui/Views/Dialog.cs +++ b/Terminal.Gui/Views/Dialog.cs @@ -14,21 +14,49 @@ namespace Terminal.Gui.Views; /// public class Dialog : Window { - private static LineStyle _defaultBorderStyle = LineStyle.Heavy; // Resources/config.json overrides - private static Alignment _defaultButtonAlignment = Alignment.End; // Resources/config.json overrides - private static AlignmentModes _defaultButtonAlignmentModes = AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems; // Resources/config.json overrides - private static int _defaultMinimumHeight = 80; // Resources/config.json overrides - private static int _defaultMinimumWidth = 80; // Resources/config.json overrides - private static ShadowStyle _defaultShadow = ShadowStyle.Transparent; // Resources/config.json overrides + /// + /// Defines the default border styling for . Can be configured via + /// . + /// + [ConfigurationProperty (Scope = typeof (ThemeScope))] + public new static LineStyle DefaultBorderStyle { get; set; } = LineStyle.Heavy; + + /// The default for . + /// This property can be set in a Theme. + [ConfigurationProperty (Scope = typeof (ThemeScope))] + public static Alignment DefaultButtonAlignment { get; set; } = Alignment.End; + + /// The default for . + /// This property can be set in a Theme. + [ConfigurationProperty (Scope = typeof (ThemeScope))] + public static AlignmentModes DefaultButtonAlignmentModes { get; set; } = AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems; + + /// + /// Defines the default minimum Dialog height, as a percentage of the container width. Can be configured via + /// . + /// + [ConfigurationProperty (Scope = typeof (ThemeScope))] + public static int DefaultMinimumHeight { get; set; } = 80; + + /// + /// Defines the default minimum Dialog width, as a percentage of the container width. Can be configured via + /// . + /// + [ConfigurationProperty (Scope = typeof (ThemeScope))] + public static int DefaultMinimumWidth { get; set; } = 80; + + /// + /// Gets or sets whether all s are shown with a shadow effect by default. + /// + [ConfigurationProperty (Scope = typeof (ThemeScope))] + public new static ShadowStyle DefaultShadow { get; set; } = ShadowStyle.Transparent; /// /// Initializes a new instance of the class with no s. /// /// - /// By default, , , , and are - /// set - /// such that the will be centered in, and no larger than 90% of , if - /// there is one. Otherwise, + /// By default, the will be centered in, and no larger than 90% of + /// , if there is one. Otherwise, /// it will be bound by the screen dimensions. /// public Dialog () @@ -49,7 +77,6 @@ public class Dialog : Window } private readonly List