mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
fix: wrong window margin and border if window is started as maximized
This commit is contained in:
parent
17b0d7ddcb
commit
d3be3e938f
3 changed files with 17 additions and 10 deletions
|
@ -11,9 +11,7 @@ namespace SourceGit.Views
|
||||||
public Launcher()
|
public Launcher()
|
||||||
{
|
{
|
||||||
var layout = ViewModels.Preference.Instance.Layout;
|
var layout = ViewModels.Preference.Instance.Layout;
|
||||||
WindowState = layout.LauncherWindowState;
|
if (layout.LauncherWindowState != WindowState.Maximized)
|
||||||
|
|
||||||
if (WindowState != WindowState.Maximized)
|
|
||||||
{
|
{
|
||||||
Width = layout.LauncherWidth;
|
Width = layout.LauncherWidth;
|
||||||
Height = layout.LauncherHeight;
|
Height = layout.LauncherHeight;
|
||||||
|
@ -22,6 +20,15 @@ namespace SourceGit.Views
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnOpened(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnOpened(e);
|
||||||
|
|
||||||
|
var layout = ViewModels.Preference.Instance.Layout;
|
||||||
|
if (layout.LauncherWindowState == WindowState.Maximized)
|
||||||
|
WindowState = WindowState.Maximized;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
||||||
{
|
{
|
||||||
base.OnPropertyChanged(change);
|
base.OnPropertyChanged(change);
|
||||||
|
|
Loading…
Reference in a new issue