Set desktop default and minimum window size
This commit is contained in:
@@ -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) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user