Fix the border not respecting the user settings.

This commit is contained in:
BDisp
2023-03-10 18:26:04 +00:00
committed by Tig
parent 88680bd763
commit e486664ccc
4 changed files with 90 additions and 11 deletions

View File

@@ -125,6 +125,11 @@ namespace UICatalog.Scenarios {
};
frame.Add (defaultButtonEdit);
var border = new Border () {
Effect3D = true,
BorderStyle = BorderStyle.Single
};
label = new Label ("Style:") {
X = 0,
Y = Pos.Bottom (label),
@@ -133,16 +138,25 @@ namespace UICatalog.Scenarios {
TextAlignment = Terminal.Gui.TextAlignment.Right,
};
frame.Add (label);
var styleRadioGroup = new RadioGroup (new ustring [] { "_Query", "_Error" }) {
X = Pos.Right (label) + 1,
Y = Pos.Top (label),
};
styleRadioGroup.SelectedItemChanged += e => {
switch (e.SelectedItem) {
case 0:
border.BorderBrush = Colors.Dialog.Normal.Foreground;
border.Background = Colors.Dialog.Normal.Background;
break;
case 1:
border.BorderBrush = Colors.Error.Normal.Foreground;
border.Background = Colors.Error.Normal.Background;
break;
}
};
frame.Add (styleRadioGroup);
var border = new Border () {
Effect3D = true,
BorderStyle = BorderStyle.Single
};
var ckbEffect3D = new CheckBox ("Effect3D", true) {
X = Pos.Right (label) + 1,
Y = Pos.Top (label) + 2