Skip to content

Commit 8f6195e

Browse files
committed
Fix TimeField default size and add launch settings
1 parent c22c4ef commit 8f6195e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/Properties/launchSettings.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
22
"profiles": {
3-
"TerminalGuiDesigner": {
4-
"commandName": "Project"
3+
"WSL": {
4+
"commandName": "WSL2",
5+
"distributionName": ""
6+
},
7+
"v2net": {
8+
"commandName": "Project",
9+
"commandLineArgs": "-d v2net"
10+
},
11+
"v2win": {
12+
"commandName": "Project",
13+
"commandLineArgs": "-d v2win"
514
}
615
}
716
}

src/ViewFactory.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ public static T Create<T>(int? width = null, int? height = null, string? text =
144144

145145
switch ( newView )
146146
{
147+
case TimeField:
148+
SetDefaultDimensions(newView, width ?? 9, height ?? 1);
149+
break;
147150
case Button:
148151
case CheckBox:
149152
case ComboBox:
@@ -323,6 +326,7 @@ public static View Create( Type requestedType )
323326
return requestedType switch
324327
{
325328
null => throw new ArgumentNullException( nameof( requestedType ) ),
329+
{ } t when t == typeof(TimeField) => Create<TimeField>(),
326330
{ } t when t == typeof( DateField ) => Create<DateField>( ),
327331
{ } t when t == typeof( Button ) => Create<Button>( ),
328332
{ } t when t == typeof( ComboBox ) => Create<ComboBox>( ),

0 commit comments

Comments
 (0)