Applied optimizations

This commit is contained in:
Thorsten Sommer 2025-07-11 22:30:44 +02:00
parent 20f3a90449
commit 9408ac4a36
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 2 additions and 6 deletions

View File

@ -6,7 +6,7 @@
<MudStack Row="true" AlignItems="AlignItems.Center" Class="mb-2 mr-3" StretchItems="StretchItems.Start"> <MudStack Row="true" AlignItems="AlignItems.Center" Class="mb-2 mr-3" StretchItems="StretchItems.Start">
<MudText Typo="Typo.h3"> <MudText Typo="Typo.h3">
@(this.Title) @this.Title
</MudText> </MudText>
<MudIconButton Variant="Variant.Text" Icon="@Icons.Material.Filled.Settings" OnClick="() => this.OpenSettingsDialog()"/> <MudIconButton Variant="Variant.Text" Icon="@Icons.Material.Filled.Settings" OnClick="() => this.OpenSettingsDialog()"/>

View File

@ -43,7 +43,7 @@ public partial class ConfigurationText : ConfigurationBaseCore
public int MaxLines { get; set; } = 12; public int MaxLines { get; set; } = 12;
private string internalText = string.Empty; private string internalText = string.Empty;
private Timer timer = new(TimeSpan.FromMilliseconds(500)) private readonly Timer timer = new(TimeSpan.FromMilliseconds(500))
{ {
AutoReset = false AutoReset = false
}; };
@ -56,8 +56,6 @@ public partial class ConfigurationText : ConfigurationBaseCore
await base.OnInitializedAsync(); await base.OnInitializedAsync();
} }
#region Overrides of ComponentBase
protected override async Task OnParametersSetAsync() protected override async Task OnParametersSetAsync()
{ {
this.internalText = this.Text(); this.internalText = this.Text();
@ -66,8 +64,6 @@ public partial class ConfigurationText : ConfigurationBaseCore
#endregion #endregion
#endregion
private bool AutoGrow => this.NumLines > 1; private bool AutoGrow => this.NumLines > 1;
private int GetMaxLines => this.AutoGrow ? this.MaxLines : 1; private int GetMaxLines => this.AutoGrow ? this.MaxLines : 1;