Skip to content

Commit a5badb8

Browse files
committed
Added arrangmenteditor to AllViewsTester
1 parent 2214d8c commit a5badb8

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

UICatalog/Scenarios/AllViewsTester.cs

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class AllViewsTester : Scenario
1919
private ListView? _classListView;
2020
private AdornmentsEditor? _adornmentsEditor;
2121

22+
private ArrangementEditor? _arrangementEditor;
23+
2224
private LayoutEditor? _layoutEditor;
2325
private FrameView? _settingsPane;
2426
private RadioGroup? _orientation;
@@ -88,23 +90,31 @@ public override void Main ()
8890
X = Pos.Right (_classListView),
8991
Y = 0,
9092
Width = Dim.Auto (),
91-
Height = Dim.Fill (),
93+
Height = Dim.Auto (),
9294
ColorScheme = Colors.ColorSchemes ["TopLevel"],
93-
BorderStyle = LineStyle.Single,
95+
BorderStyle = LineStyle.Rounded,
9496
AutoSelectViewToEdit = false,
9597
AutoSelectAdornments = false
9698
};
99+
_adornmentsEditor.ExpanderButton.Orientation = Orientation.Vertical;
97100

98-
var expandButton = new ExpanderButton
101+
_arrangementEditor = new ()
99102
{
100-
CanFocus = false,
101-
Orientation = Orientation.Horizontal
103+
Title = "Arrangement [_3]",
104+
X = Pos.Right (_classListView),
105+
Y = Pos.Bottom (_adornmentsEditor),
106+
Width = Dim.Width (_adornmentsEditor),
107+
Height = Dim.Fill (),
108+
ColorScheme = Colors.ColorSchemes ["TopLevel"],
109+
BorderStyle = LineStyle.Rounded,
110+
AutoSelectViewToEdit = false,
111+
AutoSelectAdornments = false
102112
};
103-
_adornmentsEditor.Border.Add (expandButton);
113+
_arrangementEditor.ExpanderButton.Orientation = Orientation.Vertical;
104114

105115
_layoutEditor = new ()
106116
{
107-
Title = "Layout [_3]",
117+
Title = "Layout [_4]",
108118
X = Pos.Right (_adornmentsEditor),
109119
Y = 0,
110120

@@ -119,7 +129,7 @@ public override void Main ()
119129

120130
_settingsPane = new ()
121131
{
122-
Title = "Settings [_4]",
132+
Title = "Settings [_5]",
123133
X = Pos.Right (_adornmentsEditor),
124134
Y = Pos.Bottom (_layoutEditor),
125135
Width = Dim.Width (_layoutEditor),
@@ -211,12 +221,12 @@ public override void Main ()
211221
Arrangement = ViewArrangement.Resizable,
212222
BorderStyle = LineStyle.RoundedDotted
213223
};
214-
_hostPane.Border.ColorScheme = app.ColorScheme;
215-
_hostPane.Padding.Thickness = new (1);
224+
_hostPane.Border!.ColorScheme = app.ColorScheme;
225+
_hostPane.Padding!.Thickness = new (1);
216226
_hostPane.Padding.Diagnostics = ViewDiagnosticFlags.Ruler;
217227
_hostPane.Padding.ColorScheme = app.ColorScheme;
218228

219-
app.Add (_classListView, _adornmentsEditor, _layoutEditor, _settingsPane, _eventLog, _hostPane);
229+
app.Add (_classListView, _adornmentsEditor, _arrangementEditor, _layoutEditor, _settingsPane, _eventLog, _hostPane);
220230

221231
app.Initialized += App_Initialized;
222232

@@ -284,6 +294,7 @@ private void CreateCurrentView (Type type)
284294

285295
_hostPane!.Add (_curView);
286296
_layoutEditor!.ViewToEdit = _curView;
297+
_arrangementEditor!.ViewToEdit = _curView;
287298
_curView.SetNeedsLayout ();
288299
}
289300

@@ -295,6 +306,7 @@ private void DisposeCurrentView ()
295306
_curView.SubviewsLaidOut -= CurrentView_LayoutComplete;
296307
_hostPane!.Remove (_curView);
297308
_layoutEditor!.ViewToEdit = null;
309+
_arrangementEditor!.ViewToEdit = null;
298310

299311
_curView.Dispose ();
300312
_curView = null;

UICatalog/Scenarios/Editors/ArrangementEditor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ public ArrangementEditor ()
6565
UseMinimumSize = true,
6666
Type = SliderType.Multiple,
6767
AllowEmpty = true,
68-
BorderStyle = LineStyle.Dotted,
69-
Title = "_Arrangement"
7068
};
7169

7270
protected override void OnViewToEditChanged ()

0 commit comments

Comments
 (0)