File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1255,7 +1255,7 @@ namespace winrt::TerminalApp::implementation
1255
1255
try
1256
1256
{
1257
1257
KeyChord keyChord = nullptr ;
1258
- hstring keyChordText = L" None " ;
1258
+ hstring keyChordText = L" " ;
1259
1259
if (!realArgs.KeyChord ().empty ())
1260
1260
{
1261
1261
keyChord = KeyChordSerialization::FromString (winrt::to_hstring (realArgs.KeyChord ()));
Original file line number Diff line number Diff line change @@ -4245,9 +4245,15 @@ namespace winrt::TerminalApp::implementation
4245
4245
}
4246
4246
}
4247
4247
_UpdateTeachingTipTheme (ActionSavedToast ().try_as <winrt::Windows::UI::Xaml::FrameworkElement>());
4248
- ActionSavedNameText ().Text (L" Name: " + name);
4249
- ActionSavedKeyChordText ().Text (L" Key Chord: " + keyChord);
4250
- ActionSavedCommandLineText ().Text (L" Input: " + input);
4248
+
4249
+ auto setText = [](const TextBlock& textBlock, const winrt::hstring& prefix, const winrt::hstring& text) {
4250
+ textBlock.Text (text.empty () ? L" " : prefix + text);
4251
+ textBlock.Visibility (text.empty () ? Windows::UI::Xaml::Visibility::Collapsed : Windows::UI::Xaml::Visibility::Visible);
4252
+ };
4253
+
4254
+ setText (ActionSavedNameText (), L" Name: " , name);
4255
+ setText (ActionSavedKeyChordText (), L" Key Chord: " ,keyChord );
4256
+ setText (ActionSavedCommandLineText (), L" Input: " , input);
4251
4257
4252
4258
if (page->_actionSavedToast != nullptr )
4253
4259
{
You can’t perform that action at this time.
0 commit comments