From 662c9e158052b8f06374090ee8d5ce0457c920e8 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 12 Jun 2024 10:22:26 +0800 Subject: [PATCH] enhance: remember last WindowState of Launcher --- src/ViewModels/LayoutInfo.cs | 6 ++++++ src/Views/Launcher.axaml | 1 + 2 files changed, 7 insertions(+) diff --git a/src/ViewModels/LayoutInfo.cs b/src/ViewModels/LayoutInfo.cs index f22258e9..80ce00a8 100644 --- a/src/ViewModels/LayoutInfo.cs +++ b/src/ViewModels/LayoutInfo.cs @@ -22,6 +22,12 @@ namespace SourceGit.ViewModels set; } = 720; + public WindowState LauncherWindowState + { + get; + set; + } = WindowState.Normal; + [JsonConverter(typeof(GridLengthConverter))] public GridLength RepositorySidebarWidth { diff --git a/src/Views/Launcher.axaml b/src/Views/Launcher.axaml index 4399b472..b630ee9f 100644 --- a/src/Views/Launcher.axaml +++ b/src/Views/Launcher.axaml @@ -17,6 +17,7 @@ MinWidth="1280" MinHeight="720" Width="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.LauncherWidth, Mode=TwoWay}" Height="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.LauncherHeight, Mode=TwoWay}" + WindowState="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.LauncherWindowState, Mode=TwoWay}" WindowStartupLocation="CenterScreen" ExtendClientAreaToDecorationsHint="True" ExtendClientAreaChromeHints="NoChrome"