mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-05-18 13:41:27 -04:00
Revert all changes if window is closed by user.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user