Set desktop default and minimum window size

This commit is contained in:
2026-03-31 18:05:39 +02:00
parent a6d056fe99
commit 27389bf860

View File

@@ -33,7 +33,7 @@ class Program
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Duempelkas", "window.json"); "Duempelkas", "window.json");
int savedWidth = 1280, savedHeight = 768; int savedWidth = 1280, savedHeight = 800;
if (File.Exists(settingsPath)) if (File.Exists(settingsPath))
{ {
try try
@@ -51,6 +51,9 @@ class Program
.SetSize(savedWidth, savedHeight) .SetSize(savedWidth, savedHeight)
.SetUseOsDefaultSize(false); .SetUseOsDefaultSize(false);
app.MainWindow.MinWidth = 768;
app.MainWindow.MinHeight = 480;
// Persist window size on resize // Persist window size on resize
app.MainWindow.RegisterSizeChangedHandler((_, size) => app.MainWindow.RegisterSizeChangedHandler((_, size) =>
{ {