Revert all changes if window is closed by user.

This commit is contained in:
Michael Bucari-Tovo 2025-03-19 16:38:58 -06:00
parent 733a091ebd
commit f183b587b8

View File

@ -24,6 +24,16 @@ public partial class ThemePickerDialog : DialogWindow
ThemeColors = new(EnumerateThemeItemColors(workingTheme, ActualThemeVariant));
DataContext = this;
Closing += ThemePickerDialog_Closing;
}
private void ThemePickerDialog_Closing(object? sender, Avalonia.Controls.WindowClosingEventArgs e)
{
if (!e.IsProgrammatic)
{
CancelAndClose();
e.Cancel = true;
}
}
protected override void CancelAndClose()