From 30fa8201ed2b7de91c4244953b928c196d971368 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 14 May 2025 12:57:00 +0100 Subject: [PATCH] Allow About to center in parent --- src/App.axaml.cs | 12 +++++++----- src/Views/About.axaml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 6e45164d..5cb53a5c 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -109,11 +109,13 @@ namespace SourceGit { if (data is Views.ChromelessWindow window) { - if (showAsDialog && Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner }) - window.ShowDialog(owner); - else - window.Show(); - + if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner }) + { + if (showAsDialog) + window.ShowDialog(owner); + else + window.Show(owner); + } return; } diff --git a/src/Views/About.axaml b/src/Views/About.axaml index d0dd7b82..ae32ddf4 100644 --- a/src/Views/About.axaml +++ b/src/Views/About.axaml @@ -10,7 +10,7 @@ Title="{DynamicResource Text.About}" Width="520" Height="230" CanResize="False" - WindowStartupLocation="CenterScreen"> + WindowStartupLocation="CenterOwner">