enhance: remember last WindowState of Launcher

This commit is contained in:
leo 2024-06-12 10:22:26 +08:00
parent 7c79340cc1
commit 662c9e1580
No known key found for this signature in database
GPG key ID: B528468E49CD0E58
2 changed files with 7 additions and 0 deletions

View file

@ -22,6 +22,12 @@ namespace SourceGit.ViewModels
set; set;
} = 720; } = 720;
public WindowState LauncherWindowState
{
get;
set;
} = WindowState.Normal;
[JsonConverter(typeof(GridLengthConverter))] [JsonConverter(typeof(GridLengthConverter))]
public GridLength RepositorySidebarWidth public GridLength RepositorySidebarWidth
{ {

View file

@ -17,6 +17,7 @@
MinWidth="1280" MinHeight="720" MinWidth="1280" MinHeight="720"
Width="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.LauncherWidth, Mode=TwoWay}" 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}" 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" WindowStartupLocation="CenterScreen"
ExtendClientAreaToDecorationsHint="True" ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome" ExtendClientAreaChromeHints="NoChrome"