@@ -354,7 +354,9 @@ public virtual async Task InitAsync(PluginInitContext context)
354
354
this . context = context ;
355
355
await InitSettingAsync ( ) ;
356
356
}
357
- private static readonly Thickness settingControlMargin = new ( 10 ) ;
357
+ private static readonly Thickness settingControlMargin = new ( 10 , 4 , 10 , 4 ) ;
358
+ private static readonly Thickness settingPanelMargin = new ( 15 , 20 , 15 , 20 ) ;
359
+ private static readonly Thickness settingTextBlockMargin = new ( 10 , 4 , 10 , 4 ) ;
358
360
private JsonRpcConfigurationModel _settingsTemplate ;
359
361
public Control CreateSettingPanel ( )
360
362
{
@@ -363,7 +365,7 @@ public Control CreateSettingPanel()
363
365
var settingWindow = new UserControl ( ) ;
364
366
var mainPanel = new StackPanel
365
367
{
366
- Margin = settingControlMargin ,
368
+ Margin = settingPanelMargin ,
367
369
Orientation = Orientation . Vertical
368
370
} ;
369
371
settingWindow . Content = mainPanel ;
@@ -375,10 +377,13 @@ public Control CreateSettingPanel()
375
377
Orientation = Orientation . Horizontal ,
376
378
Margin = settingControlMargin
377
379
} ;
378
- var name = new Label ( )
380
+ var name = new TextBlock ( )
379
381
{
380
- Content = attribute . Label ,
381
- Margin = settingControlMargin
382
+ Text = attribute . Label ,
383
+ Width = 120 ,
384
+ VerticalAlignment = VerticalAlignment . Center ,
385
+ Margin = settingControlMargin ,
386
+ TextWrapping = TextWrapping . WrapWithOverflow
382
387
} ;
383
388
384
389
FrameworkElement contentControl ;
@@ -390,8 +395,8 @@ public Control CreateSettingPanel()
390
395
contentControl = new TextBlock
391
396
{
392
397
Text = attribute . Description . Replace ( "\\ r\\ n" , "\r \n " ) ,
393
- Margin = settingControlMargin ,
394
- MaxWidth = 400 ,
398
+ Margin = settingTextBlockMargin ,
399
+ MaxWidth = 500 ,
395
400
TextWrapping = TextWrapping . WrapWithOverflow
396
401
} ;
397
402
break ;
0 commit comments