Remember uploader window size
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-12 21:03:27 +01:00
parent 898ac9ff0e
commit be722f6e37
3 changed files with 33 additions and 3 deletions

View File

@@ -53,6 +53,8 @@ public partial class MainWindow : Window
_liveTimer.Interval = TimeSpan.FromSeconds(30);
_liveTimer.Tick += (_, _) => UpdateLiveStatus();
_liveTimer.Start();
Opened += OnWindowOpened;
Closing += OnWindowClosing;
ApplySettings();
}
@@ -185,6 +187,31 @@ public partial class MainWindow : Window
UpdateSteps();
}
private void OnWindowOpened(object? sender, EventArgs e)
{
ApplyWindowSize();
}
private void OnWindowClosing(object? sender, WindowClosingEventArgs e)
{
_settings.WindowWidth = Width;
_settings.WindowHeight = Height;
_settingsStore.Save(_settings);
}
private void ApplyWindowSize()
{
if (_settings.WindowWidth > 0)
{
Width = Math.Max(MinWidth, _settings.WindowWidth);
}
if (_settings.WindowHeight > 0)
{
Height = Math.Max(MinHeight, _settings.WindowHeight);
}
}
private void StartUploadPipelineIfReady()
{
if (string.IsNullOrWhiteSpace(_settings.UploadUrl) || string.IsNullOrWhiteSpace(_settings.WatchFolder))