Skip to content

Commit b963d60

Browse files
committed
Explicitly introduce and use profile generator icons; add VS logo
1 parent f3e3f43 commit b963d60

File tree

11 files changed

+15
-11
lines changed

11 files changed

+15
-11
lines changed
Loading
Loading
Loading
Loading
Loading

src/cascadia/CascadiaResources.build.items

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
<DeploymentContent>true</DeploymentContent>
2222
<Link>ProfileIcons\%(RecursiveDir)%(FileName)%(Extension)</Link>
2323
</Content>
24+
<!-- Profile Generator Icons -->
25+
<Content Include="$(OpenConsoleDir)src\cascadia\CascadiaPackage\ProfileGeneratorIcons\**\*">
26+
<DeploymentContent>true</DeploymentContent>
27+
<Link>ProfileGeneratorIcons\%(RecursiveDir)%(FileName)%(Extension)</Link>
28+
</Content>
2429
<!-- Default Settings -->
2530
<Content Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\defaults.json">
2631
<DeploymentContent>true</DeploymentContent>

src/cascadia/TerminalSettingsModel/AzureCloudShellGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using namespace ::Microsoft::Terminal::Settings::Model;
1414
using namespace winrt::Microsoft::Terminal::Settings::Model;
1515
using namespace winrt::Microsoft::Terminal::TerminalConnection;
1616

17-
std::wstring_view PROFILE_ICON_PATH_HIGH_RES{ L"ms-appx:///ProfileIcons/{b453ae62-4e3d-5e58-b989-0a998ec441b8}.scale-200.png" };
17+
std::wstring_view GENERATOR_ICON_PATH{ L"ms-appx:///ProfileGeneratorIcons/AzureCloudShell.png" };
1818

1919
std::wstring_view AzureCloudShellGenerator::GetNamespace() const noexcept
2020
{
@@ -28,7 +28,7 @@ std::wstring_view AzureCloudShellGenerator::GetDisplayName() const noexcept
2828

2929
std::wstring_view AzureCloudShellGenerator::GetIcon() const noexcept
3030
{
31-
return PROFILE_ICON_PATH_HIGH_RES;
31+
return GENERATOR_ICON_PATH;
3232
}
3333

3434
// Method Description:

src/cascadia/TerminalSettingsModel/PowershellCoreProfileGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ static constexpr std::wstring_view POWERSHELL_PFN{ L"Microsoft.PowerShell_8wekyb
2121
static constexpr std::wstring_view POWERSHELL_PREVIEW_PFN{ L"Microsoft.PowerShellPreview_8wekyb3d8bbwe" };
2222
static constexpr std::wstring_view PWSH_EXE{ L"pwsh.exe" };
2323
static constexpr std::wstring_view POWERSHELL_ICON{ L"ms-appx:///ProfileIcons/pwsh.png" };
24-
static constexpr std::wstring_view POWERSHELL_ICON_HIGH_RES{ L"ms-appx:///ProfileIcons/pwsh.scale-200.png" };
2524
static constexpr std::wstring_view POWERSHELL_PREVIEW_ICON{ L"ms-appx:///ProfileIcons/pwsh-preview.png" };
25+
static constexpr std::wstring_view GENERATOR_POWERSHELL_ICON{ L"ms-appx:///ProfileGeneratorIcons/PowerShell.png" };
2626
static constexpr std::wstring_view POWERSHELL_PREFERRED_PROFILE_NAME{ L"PowerShell" };
2727

2828
namespace
@@ -303,7 +303,7 @@ std::wstring_view PowershellCoreProfileGenerator::GetDisplayName() const noexcep
303303

304304
std::wstring_view PowershellCoreProfileGenerator::GetIcon() const noexcept
305305
{
306-
return POWERSHELL_ICON_HIGH_RES;
306+
return GENERATOR_POWERSHELL_ICON;
307307
}
308308

309309
// Method Description:

src/cascadia/TerminalSettingsModel/SshHostGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ static constexpr std::wstring_view SshHostGeneratorNamespace{ L"Windows.Terminal
1313

1414
static constexpr std::wstring_view PROFILE_TITLE_PREFIX = L"SSH - ";
1515
static constexpr std::wstring_view PROFILE_ICON_PATH = L"ms-appx:///ProfileIcons/{550ce7b8-d500-50ad-8a1a-c400c3262db3}.png";
16-
static constexpr std::wstring_view PROFILE_ICON_PATH_HIGH_RES = L"ms-appx:///ProfileIcons/{550ce7b8-d500-50ad-8a1a-c400c3262db3}.scale-200.png";
16+
static constexpr std::wstring_view GENERATOR_ICON_PATH = L"ms-appx:///ProfileGeneratorIcons/SSH.png";
1717

1818
// OpenSSH is installed under System32 when installed via Optional Features
1919
static constexpr std::wstring_view SSH_EXE_PATH1 = L"%SystemRoot%\\System32\\OpenSSH\\ssh.exe";
@@ -141,7 +141,7 @@ std::wstring_view SshHostGenerator::GetDisplayName() const noexcept
141141

142142
std::wstring_view SshHostGenerator::GetIcon() const noexcept
143143
{
144-
return PROFILE_ICON_PATH_HIGH_RES;
144+
return GENERATOR_ICON_PATH;
145145
}
146146

147147
// Method Description:

src/cascadia/TerminalSettingsModel/VisualStudioGenerator.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
using namespace winrt::Microsoft::Terminal::Settings::Model;
1212

1313
std::wstring_view VisualStudioGenerator::Namespace{ L"Windows.Terminal.VisualStudio" };
14-
// TODO CARLOS: Can we get the plain Visual Studio logo that looks like this: |><| ?
15-
static constexpr std::wstring_view IconHighRes{ L"ms-appx:///ProfileIcons/vs-pwsh.scale-200.png" };
14+
static constexpr std::wstring_view IconPath{ L"ms-appx:///ProfileGeneratorIcons/VisualStudio.png" };
1615

1716
std::wstring_view VisualStudioGenerator::GetNamespace() const noexcept
1817
{
@@ -26,7 +25,7 @@ std::wstring_view VisualStudioGenerator::GetDisplayName() const noexcept
2625

2726
std::wstring_view VisualStudioGenerator::GetIcon() const noexcept
2827
{
29-
return IconHighRes;
28+
return IconPath;
3029
}
3130

3231
void VisualStudioGenerator::GenerateProfiles(std::vector<winrt::com_ptr<implementation::Profile>>& profiles) const

src/cascadia/TerminalSettingsModel/WslDistroGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ static constexpr std::wstring_view WslHomeDirectory{ L"~" };
1414
static constexpr std::wstring_view DockerDistributionPrefix{ L"docker-desktop" };
1515
static constexpr std::wstring_view RancherDistributionPrefix{ L"rancher-desktop" };
1616
static constexpr std::wstring_view IconPath{ L"ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png" };
17-
static constexpr std::wstring_view IconPathHighRes{ L"ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.scale-200.png" };
17+
static constexpr std::wstring_view GeneratorIconPath{ L"ms-appx:///ProfileGeneratorIcons/WSL.png" };
1818

1919
// The WSL entries are structured as such:
2020
// HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss
@@ -57,7 +57,7 @@ std::wstring_view WslDistroGenerator::GetDisplayName() const noexcept
5757

5858
std::wstring_view WslDistroGenerator::GetIcon() const noexcept
5959
{
60-
return IconPathHighRes;
60+
return GeneratorIconPath;
6161
}
6262

6363
static winrt::com_ptr<implementation::Profile> makeProfile(const std::wstring& distName)

0 commit comments

Comments
 (0)