mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 03:34:59 +00:00
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:
parent
6c62789c4c
commit
85b223a3d0
4 changed files with 16 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -38,3 +38,4 @@ build/*.rpm
|
||||||
build/*.AppImage
|
build/*.AppImage
|
||||||
SourceGit.app/
|
SourceGit.app/
|
||||||
build.command
|
build.command
|
||||||
|
src/Properties/launchSettings.json
|
||||||
|
|
|
@ -109,8 +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);
|
{
|
||||||
|
if (showAsDialog)
|
||||||
|
window.ShowDialog(owner);
|
||||||
|
else
|
||||||
|
window.Show(owner);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
window.Show();
|
window.Show();
|
||||||
|
|
||||||
|
|
|
@ -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}">
|
||||||
|
@ -67,4 +67,9 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<Window.KeyBindings>
|
||||||
|
<KeyBinding Gesture="Escape" Command="{Binding #ThisControl.Close}"/>
|
||||||
|
</Window.KeyBindings>
|
||||||
|
|
||||||
</v:ChromelessWindow>
|
</v:ChromelessWindow>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
Title="{DynamicResource Text.Warn}"
|
Title="{DynamicResource Text.Warn}"
|
||||||
SizeToContent="WidthAndHeight"
|
SizeToContent="WidthAndHeight"
|
||||||
CanResize="False"
|
CanResize="False"
|
||||||
|
ShowInTaskbar="False"
|
||||||
WindowStartupLocation="CenterOwner">
|
WindowStartupLocation="CenterOwner">
|
||||||
<Grid RowDefinitions="Auto,Auto,Auto">
|
<Grid RowDefinitions="Auto,Auto,Auto">
|
||||||
<!-- TitleBar -->
|
<!-- TitleBar -->
|
||||||
|
@ -64,6 +65,7 @@
|
||||||
Height="30"
|
Height="30"
|
||||||
Margin="4,0"
|
Margin="4,0"
|
||||||
Click="CloseWindow"
|
Click="CloseWindow"
|
||||||
|
IsCancel="True"
|
||||||
Content="{DynamicResource Text.Cancel}"
|
Content="{DynamicResource Text.Cancel}"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
VerticalContentAlignment="Center"/>
|
VerticalContentAlignment="Center"/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue