From 46374983637ff95cafa81f22fe80f543bea6deed Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 19 Dec 2023 13:13:20 -0800 Subject: [PATCH 1/5] Theme Docker Container Selector Dialog This PR updates the Docker Container Selector Dialog in Visual Studio to be themed. The following changes were done: - Updates VS packages since some of the newer theming was in newer packages. - Newer packages had new attributes that needed to be handled with MakePIAPortableTool. - Converted ListBox to ListView for ContainerPickerDialog and modified associated automation peers --- build/package_versions.settings.targets | 26 +- src/DebugEngineHost/DebugEngineHost.csproj | 2 - src/MIDebugPackage/MIDebugPackage.csproj | 2 - src/MakePIAPortable/MakePIAPortable.csproj | 14 +- src/SSHDebugPS/SSHDebugPS.csproj | 2 - .../UI/ContainerPickerDialogWindow.xaml | 360 ++++++++++-------- .../UI/ContainerPickerDialogWindow.xaml.cs | 39 +- .../ContainerListBoxItemAutomationPeer.cs | 4 +- ....cs => ContainerListViewAutomationPeer.cs} | 6 +- .../UI/Controls/ContainerListBox.cs | 4 +- .../UI/ViewModels/ContainerPickerViewModel.cs | 15 + .../MakePIAPortableTool.cs | 5 +- 12 files changed, 282 insertions(+), 197 deletions(-) rename src/SSHDebugPS/UI/Controls/Automation/{ContainerListBoxAutomationPeer.cs => ContainerListViewAutomationPeer.cs} (61%) diff --git a/build/package_versions.settings.targets b/build/package_versions.settings.targets index c1eee41bb..00cbaa3ed 100644 --- a/build/package_versions.settings.targets +++ b/build/package_versions.settings.targets @@ -1,8 +1,8 @@ 1.0.1 - 17.0.0-previews-1-31410-258 - 13.0.1 + 17.8.37221 + 13.0.3 17.2.60629.1 @@ -19,20 +19,20 @@ 17.0.28-g439d20ddd3 17.0.1051901-preview - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.17-alpha - 17.0.0-previews-1-31410-258 + 17.5.33428.388 + 17.9.36678 + 17.6.36389 + 17.6.36389 + 17.6.36389 + 17.9.36678 + 17.8.37221 + 17.8.37221 + 17.8.14 + 17.8.37221 15.0.26932 15.0.392 15.0.392 - 17.0.0-previews-1-31410-258 + 17.8.37221 17.3.2093 4.3.0 diff --git a/src/DebugEngineHost/DebugEngineHost.csproj b/src/DebugEngineHost/DebugEngineHost.csproj index 5a09a365d..03bd58c69 100755 --- a/src/DebugEngineHost/DebugEngineHost.csproj +++ b/src/DebugEngineHost/DebugEngineHost.csproj @@ -88,8 +88,6 @@ compile all - - diff --git a/src/MIDebugPackage/MIDebugPackage.csproj b/src/MIDebugPackage/MIDebugPackage.csproj index 67e436c68..fe7a3a4ad 100755 --- a/src/MIDebugPackage/MIDebugPackage.csproj +++ b/src/MIDebugPackage/MIDebugPackage.csproj @@ -38,8 +38,6 @@ - - compile all diff --git a/src/MakePIAPortable/MakePIAPortable.csproj b/src/MakePIAPortable/MakePIAPortable.csproj index 16fd00340..235f6baf0 100644 --- a/src/MakePIAPortable/MakePIAPortable.csproj +++ b/src/MakePIAPortable/MakePIAPortable.csproj @@ -41,13 +41,13 @@ - - - - - - - + + + + + + + diff --git a/src/SSHDebugPS/SSHDebugPS.csproj b/src/SSHDebugPS/SSHDebugPS.csproj index 677a34d63..f270e64e6 100644 --- a/src/SSHDebugPS/SSHDebugPS.csproj +++ b/src/SSHDebugPS/SSHDebugPS.csproj @@ -27,8 +27,6 @@ all - - diff --git a/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml b/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml index c765009f6..b59ccd7c4 100644 --- a/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml +++ b/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml @@ -6,7 +6,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:platformui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0" - xmlns:vsui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell" + xmlns:vsui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0" xmlns:vsimaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging" xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog" xmlns:local="clr-namespace:Microsoft.SSHDebugPS" @@ -18,22 +18,115 @@ Height="600" ShowInTaskbar="False" Name="ContainerPickerDialog" + Background="{DynamicResource {x:Static platformui:ThemedDialogColors.WindowPanelBrushKey}}" + Foreground="{DynamicResource {x:Static platformui:ThemedDialogColors.WindowPanelTextBrushKey}}" FontFamily="{DynamicResource VsFont.EnvironmentFontFamily}" FontSize="{DynamicResource VsFont.EnvironmentFontSize}" Title="{x:Static local:UIResources.DialogTitle}" WindowStartupLocation="CenterOwner"> + + + + + + + + + + + @@ -103,7 +197,7 @@ Value="Transparent" /> - - - @@ -278,6 +275,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SSHDebugPS/UI/Converters/BoolToVisibilityConverter.cs b/src/SSHDebugPS/UI/Converters/BoolToVisibilityConverter.cs index b2a983bb3..81e7bf42a 100644 --- a/src/SSHDebugPS/UI/Converters/BoolToVisibilityConverter.cs +++ b/src/SSHDebugPS/UI/Converters/BoolToVisibilityConverter.cs @@ -9,12 +9,13 @@ namespace Microsoft.SSHDebugPS.Docker { internal class BoolToVisibilityConverter : IValueConverter { + public bool Negative { get; set; } + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (targetType == typeof(Visibility)) { - // Could have a parameter - if (parameter != null) + if (Negative) { // Only allowed param is flip return (bool)value ? Visibility.Collapsed : Visibility.Visible; diff --git a/src/SSHDebugPS/UI/ViewModels/ContainerPickerViewModel.cs b/src/SSHDebugPS/UI/ViewModels/ContainerPickerViewModel.cs index c795ceef9..746509b01 100644 --- a/src/SSHDebugPS/UI/ViewModels/ContainerPickerViewModel.cs +++ b/src/SSHDebugPS/UI/ViewModels/ContainerPickerViewModel.cs @@ -296,7 +296,6 @@ private bool IsLibLinuxAvailable() } } - // Default is to Support SSH Connections private bool _isMaximized = false; public bool IsMaximized { From 731f4aca13ee9789b8c2519b432ee862b7786234 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 19 Dec 2023 13:55:19 -0800 Subject: [PATCH 3/5] Revert to 17.5.33428.366 --- build/package_versions.settings.targets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/package_versions.settings.targets b/build/package_versions.settings.targets index 00cbaa3ed..470194d01 100644 --- a/build/package_versions.settings.targets +++ b/build/package_versions.settings.targets @@ -20,11 +20,11 @@ 17.0.28-g439d20ddd3 17.0.1051901-preview 17.5.33428.388 - 17.9.36678 - 17.6.36389 - 17.6.36389 - 17.6.36389 - 17.9.36678 + 17.5.33428.366 + 17.5.33428.366 + 17.5.33428.366 + 17.5.33428.366 + 17.5.33428.366 17.8.37221 17.8.37221 17.8.14 From 8a3a8b59fe22a06a21f5da63d3915d2a943f3f0f Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 19 Dec 2023 16:50:18 -0800 Subject: [PATCH 4/5] Remove Maximize Functionality --- src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml | 13 ------------- .../UI/ContainerPickerDialogWindow.xaml.cs | 12 ------------ .../UI/ViewModels/ContainerPickerViewModel.cs | 14 -------------- 3 files changed, 39 deletions(-) diff --git a/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml b/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml index 35182bd48..e80ed6d5e 100644 --- a/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml +++ b/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml @@ -470,19 +470,6 @@ Orientation="Horizontal" HorizontalAlignment="Right" WindowChrome.IsHitTestVisibleInChrome="true"> -