mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-18 22:45:59 +01:00
Rebuild the settings page
A sticky quality bar, a level and a reset per section, key bindings in their own tab. UART moves into the page. A log and tools window replaces AdvancedSettingsWindow, and the developer tab is gone.
This commit is contained in:
@@ -17,6 +17,13 @@ public class SettingRow : ContentControl
|
||||
public static readonly StyledProperty<string?> ValueTextProperty =
|
||||
AvaloniaProperty.Register<SettingRow, string?>(nameof(ValueText));
|
||||
|
||||
/// <summary>
|
||||
/// Why the simulator to be started would pass this setting over; the row dims
|
||||
/// and says so. The input stays usable - the file may serve another build.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<string?> IdleNoteProperty =
|
||||
AvaloniaProperty.Register<SettingRow, string?>(nameof(IdleNote));
|
||||
|
||||
public string? Label
|
||||
{
|
||||
get => GetValue(LabelProperty);
|
||||
@@ -41,6 +48,12 @@ public class SettingRow : ContentControl
|
||||
set => SetValue(ValueTextProperty, value);
|
||||
}
|
||||
|
||||
public string? IdleNote
|
||||
{
|
||||
get => GetValue(IdleNoteProperty);
|
||||
set => SetValue(IdleNoteProperty, value);
|
||||
}
|
||||
|
||||
public SettingRow()
|
||||
{
|
||||
UpdatePseudoClasses();
|
||||
@@ -54,8 +67,12 @@ public class SettingRow : ContentControl
|
||||
change.Property == DescriptionProperty ||
|
||||
change.Property == ConfigKeyProperty ||
|
||||
change.Property == ValueTextProperty ||
|
||||
change.Property == IdleNoteProperty ||
|
||||
change.Property == ContentProperty)
|
||||
UpdatePseudoClasses();
|
||||
|
||||
if (change.Property == IdleNoteProperty)
|
||||
ToolTip.SetTip(this, string.IsNullOrEmpty(IdleNote) ? null : IdleNote);
|
||||
}
|
||||
|
||||
private void UpdatePseudoClasses()
|
||||
@@ -65,5 +82,6 @@ public class SettingRow : ContentControl
|
||||
PseudoClasses.Set(":no-key", string.IsNullOrEmpty(ConfigKey));
|
||||
PseudoClasses.Set(":no-value", string.IsNullOrEmpty(ValueText));
|
||||
PseudoClasses.Set(":no-content", Content is null);
|
||||
PseudoClasses.Set(":idle", !string.IsNullOrEmpty(IdleNote));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user