Task/UI usability tweaks (#1314)

* Allow About to center in parent
* About closes on Escape
* ConfirmEmptyCommit dialog closes on Escape
* Ignore Dev file
* Missed condition

---------

Co-authored-by: Martin Smith <martin.smith@purplebricks.com>
This commit is contained in:
Martin Smith 2025-05-16 02:27:42 +01:00 committed by GitHub
parent 6c62789c4c
commit 85b223a3d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 3 deletions

1
.gitignore vendored
View file

@ -38,3 +38,4 @@ build/*.rpm
build/*.AppImage
SourceGit.app/
build.command
src/Properties/launchSettings.json

View file

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

View file

@ -10,7 +10,7 @@
Title="{DynamicResource Text.About}"
Width="520" Height="230"
CanResize="False"
WindowStartupLocation="CenterScreen">
WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="Auto,*">
<!-- TitleBar -->
<Grid Grid.Row="0" Height="28" IsVisible="{Binding !#ThisControl.UseSystemWindowFrame}">
@ -67,4 +67,9 @@
</StackPanel>
</Grid>
</Grid>
<Window.KeyBindings>
<KeyBinding Gesture="Escape" Command="{Binding #ThisControl.Close}"/>
</Window.KeyBindings>
</v:ChromelessWindow>

View file

@ -12,6 +12,7 @@
Title="{DynamicResource Text.Warn}"
SizeToContent="WidthAndHeight"
CanResize="False"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="Auto,Auto,Auto">
<!-- TitleBar -->
@ -64,6 +65,7 @@
Height="30"
Margin="4,0"
Click="CloseWindow"
IsCancel="True"
Content="{DynamicResource Text.Cancel}"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"/>