diff --git a/src/ViewModels/Clone.cs b/src/ViewModels/Clone.cs index 641fd544..a40ddee5 100644 --- a/src/ViewModels/Clone.cs +++ b/src/ViewModels/Clone.cs @@ -66,7 +66,7 @@ namespace SourceGit.ViewModels { Dispatcher.UIThread.Invoke(() => Remote = text); } - } + } catch { // ignore diff --git a/src/Views/CommitRefsPresenter.cs b/src/Views/CommitRefsPresenter.cs index b49a8c02..21e506e2 100644 --- a/src/Views/CommitRefsPresenter.cs +++ b/src/Views/CommitRefsPresenter.cs @@ -83,14 +83,14 @@ namespace SourceGit.Views static CommitRefsPresenter() { AffectsMeasure( - FontFamilyProperty, + FontFamilyProperty, FontSizeProperty, LabelForegroundProperty); AffectsRender( - IconBackgroundProperty, - IconForegroundProperty, - BranchNameBackgroundProperty, + IconBackgroundProperty, + IconForegroundProperty, + BranchNameBackgroundProperty, TagNameBackgroundProperty); } @@ -102,7 +102,7 @@ namespace SourceGit.Views var iconFG = IconForeground; var iconBG = IconBackground; var branchBG = BranchNameBackground; - var tagBG = TagNameBackground; + var tagBG = TagNameBackground; var x = 0.0; foreach (var item in _items) @@ -141,7 +141,7 @@ namespace SourceGit.Views foreach (var decorator in commit.Decorators) { - var isHead = decorator.Type == Models.DecoratorType.CurrentBranchHead || + var isHead = decorator.Type == Models.DecoratorType.CurrentBranchHead || decorator.Type == Models.DecoratorType.CurrentCommitHead; var label = new FormattedText( diff --git a/src/Views/Launcher.axaml.cs b/src/Views/Launcher.axaml.cs index 54cee37d..36eb0589 100644 --- a/src/Views/Launcher.axaml.cs +++ b/src/Views/Launcher.axaml.cs @@ -11,9 +11,7 @@ namespace SourceGit.Views public Launcher() { var layout = ViewModels.Preference.Instance.Layout; - WindowState = layout.LauncherWindowState; - - if (WindowState != WindowState.Maximized) + if (layout.LauncherWindowState != WindowState.Maximized) { Width = layout.LauncherWidth; Height = layout.LauncherHeight; @@ -22,6 +20,15 @@ namespace SourceGit.Views 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) { base.OnPropertyChanged(change);