feat(start): starting with unsaved settings asks first

Edits on the settings page (or of the keys) not saved yet: the start asks whether to save them
and start, start without them, or not start. Closing the question starts nothing. "Start
without saving settings" from the menu asks nothing, as it says what it does.
This commit is contained in:
maj00r
2026-11-16 00:09:36 +01:00
parent 76693c1494
commit b63ba8fe2e
8 changed files with 60 additions and 1 deletions

View File

@@ -1482,9 +1482,12 @@ public partial class Settings : UserControl, ISettingsCapture
UpdateSaveState();
}
/// <summary>Edits on the page, or of the keys, not saved yet: what "Niezapisane zmiany" tells.</summary>
public bool HasUnsavedChanges => _dirty || KeyboardConfig.Instance.Dirty;
private void UpdateSaveState()
{
bool dirty = _dirty || KeyboardConfig.Instance.Dirty;
bool dirty = HasUnsavedChanges;
SaveButton.Classes.Set("Accent", dirty);
SaveStatus.Text = dirty ? App.Loc["UnsavedChanges"] : string.Empty;
}