Allow About to center in parent

This commit is contained in:
Martin Smith 2025-05-14 12:57:00 +01:00
parent 463d161ac7
commit 30fa8201ed
2 changed files with 8 additions and 6 deletions

View file

@ -109,11 +109,13 @@ namespace SourceGit
{ {
if (data is Views.ChromelessWindow window) if (data is Views.ChromelessWindow window)
{ {
if (showAsDialog && Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner }) if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
window.ShowDialog(owner); {
else if (showAsDialog)
window.Show(); window.ShowDialog(owner);
else
window.Show(owner);
}
return; return;
} }

View file

@ -10,7 +10,7 @@
Title="{DynamicResource Text.About}" Title="{DynamicResource Text.About}"
Width="520" Height="230" Width="520" Height="230"
CanResize="False" CanResize="False"
WindowStartupLocation="CenterScreen"> WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="Auto,*"> <Grid RowDefinitions="Auto,*">
<!-- TitleBar --> <!-- TitleBar -->
<Grid Grid.Row="0" Height="28" IsVisible="{Binding !#ThisControl.UseSystemWindowFrame}"> <Grid Grid.Row="0" Height="28" IsVisible="{Binding !#ThisControl.UseSystemWindowFrame}">