From 505aa7638a947d2e6b57f13a33ea4e2a6288f688 Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Sun, 11 Feb 2018 11:04:26 -0800 Subject: [PATCH] Minor UX tweaks (resize grips) --- .../Features/IndexServerInfo/DirectoryDetailsDialog.xaml | 1 + .../IndexServerInfo/ProjectConfigurationDetailsDialog.xaml | 1 + .../Features/IndexServerInfo/ProjectDetailsDialog.xaml | 1 + .../Features/IndexServerInfo/ServerDetailsDialog.xaml | 1 + .../Features/IndexServerInfo/ServerStatusDialog.xaml | 1 + .../Features/IndexServerInfo/ShowServerInfoService.cs | 7 ++++++- 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/VsChromium/Features/IndexServerInfo/DirectoryDetailsDialog.xaml b/src/VsChromium/Features/IndexServerInfo/DirectoryDetailsDialog.xaml index da148f0e..dcdb3b86 100644 --- a/src/VsChromium/Features/IndexServerInfo/DirectoryDetailsDialog.xaml +++ b/src/VsChromium/Features/IndexServerInfo/DirectoryDetailsDialog.xaml @@ -6,6 +6,7 @@ xmlns:platformUi="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.12.0" xmlns:indexServerInfo="clr-namespace:VsChromium.Features.IndexServerInfo" Title="VsChromium Directory Index Details" + ResizeMode="CanResizeWithGrip" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="800" Width="800" Height="600"> diff --git a/src/VsChromium/Features/IndexServerInfo/ProjectConfigurationDetailsDialog.xaml b/src/VsChromium/Features/IndexServerInfo/ProjectConfigurationDetailsDialog.xaml index f873df03..3fef7f0f 100644 --- a/src/VsChromium/Features/IndexServerInfo/ProjectConfigurationDetailsDialog.xaml +++ b/src/VsChromium/Features/IndexServerInfo/ProjectConfigurationDetailsDialog.xaml @@ -7,6 +7,7 @@ xmlns:indexServerInfo="clr-namespace:VsChromium.Features.IndexServerInfo" xmlns:typedMessages="clr-namespace:VsChromium.Core.Ipc.TypedMessages;assembly=VsChromium.Core" Title="VsChromium Project Configuration Details" + ResizeMode="CanResizeWithGrip" mc:Ignorable="d" d:DataContext="{d:DesignInstance Type=typedMessages:ProjectDetails, IsDesignTimeCreatable=True}" d:DesignHeight="300" d:DesignWidth="800" diff --git a/src/VsChromium/Features/IndexServerInfo/ProjectDetailsDialog.xaml b/src/VsChromium/Features/IndexServerInfo/ProjectDetailsDialog.xaml index 8ecdae5b..21335308 100644 --- a/src/VsChromium/Features/IndexServerInfo/ProjectDetailsDialog.xaml +++ b/src/VsChromium/Features/IndexServerInfo/ProjectDetailsDialog.xaml @@ -6,6 +6,7 @@ xmlns:platformUi="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.12.0" xmlns:indexServerInfo="clr-namespace:VsChromium.Features.IndexServerInfo" Title="VsChromium Project Index Details" + ResizeMode="CanResizeWithGrip" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="800" Width="800" Height="600"> diff --git a/src/VsChromium/Features/IndexServerInfo/ServerDetailsDialog.xaml b/src/VsChromium/Features/IndexServerInfo/ServerDetailsDialog.xaml index bb0c314c..b82d2f56 100644 --- a/src/VsChromium/Features/IndexServerInfo/ServerDetailsDialog.xaml +++ b/src/VsChromium/Features/IndexServerInfo/ServerDetailsDialog.xaml @@ -6,6 +6,7 @@ xmlns:platformUi="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.12.0" xmlns:indexServerInfo="clr-namespace:VsChromium.Features.IndexServerInfo" Title="VsChromium Index Details" + ResizeMode="CanResizeWithGrip" mc:Ignorable="d" Width="800" Height="600" d:DesignHeight="300" d:DesignWidth="300"> diff --git a/src/VsChromium/Features/IndexServerInfo/ServerStatusDialog.xaml b/src/VsChromium/Features/IndexServerInfo/ServerStatusDialog.xaml index 8a825770..e12f625c 100644 --- a/src/VsChromium/Features/IndexServerInfo/ServerStatusDialog.xaml +++ b/src/VsChromium/Features/IndexServerInfo/ServerStatusDialog.xaml @@ -8,6 +8,7 @@ mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="600" Title="VsChromium Indexing Server Information" + ResizeMode="CanResizeWithGrip" Width="600" Height="400"> diff --git a/src/VsChromium/Features/IndexServerInfo/ShowServerInfoService.cs b/src/VsChromium/Features/IndexServerInfo/ShowServerInfoService.cs index f6b4354b..0eabebe6 100644 --- a/src/VsChromium/Features/IndexServerInfo/ShowServerInfoService.cs +++ b/src/VsChromium/Features/IndexServerInfo/ShowServerInfoService.cs @@ -42,7 +42,12 @@ public void ShowServerStatusDialog() { return; } dialog.ViewModel.ProjectCount = response.ProjectCount; - dialog.ViewModel.ShowServerDetailsInvoked += (sender, args) => OnShowServerDetailsInvoked(); + dialog.ViewModel.ShowServerDetailsInvoked += (sender, args) => { + // Close dialog to avoid too many nested modal dialogs, which can be + // confusing. + dialog.Close(); + OnShowServerDetailsInvoked(); + }; var message = new StringBuilder(); message.AppendFormat("-- {0} --\r\n", GetIndexingServerStatusText(response)); message.AppendLine();