Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Defterm info to ComboBoxItem properly #12259

Merged
1 commit merged into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/cascadia/TerminalSettingsEditor/Launch.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,18 @@
<TextBlock Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="2"
AutomationProperties.AccessibilityView="Raw"
Text="{x:Bind Name}" />

<TextBlock Grid.Row="1"
Grid.Column="1"
AutomationProperties.AccessibilityView="Raw"
Style="{ThemeResource SecondaryTextBlockStyle}"
Text="{x:Bind Author}" />

<TextBlock Grid.Row="1"
Grid.Column="2"
AutomationProperties.AccessibilityView="Raw"
Style="{ThemeResource SecondaryTextBlockStyle}"
Text="{x:Bind Version}" />

Expand Down
5 changes: 5 additions & 0 deletions src/cascadia/TerminalSettingsModel/DefaultTerminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
{
explicit DefaultTerminal(DelegationConfig::DelegationPackage&& pkg);

hstring ToString()
{
return hstring{ fmt::format(L"{}, {}, {}", Name(), Author(), Version()) };
}

hstring Name() const;
hstring Author() const;
hstring Version() const;
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/DefaultTerminal.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.Terminal.Settings.Model
{
runtimeclass DefaultTerminal
runtimeclass DefaultTerminal : Windows.Foundation.IStringable
{
String Name { get; };
String Author { get; };
Expand Down