[Run] Highlight search text (#11635)

* Add bolded type

* Inline get set

* Fix

* Update expect.txt

IMulti

Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
This commit is contained in:
Niels Laute
2021-06-08 20:23:27 +02:00
committed by GitHub
parent 55b6fb8da6
commit 884a313f3c
7 changed files with 99 additions and 33 deletions

View File

@@ -114,7 +114,7 @@ namespace Microsoft.Plugin.Program.Programs
// To set the title to always be the displayname of the packaged application
result.Title = DisplayName;
result.SetTitleHighlightData(StringMatcher.FuzzySearch(query, Name).MatchData);
result.TitleHighlightData = StringMatcher.FuzzySearch(query, Name).MatchData;
// Using CurrentCulture since this is user facing
var toolTipTitle = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", Properties.Resources.powertoys_run_plugin_program_file_name, result.Title);

View File

@@ -234,7 +234,7 @@ namespace Microsoft.Plugin.Program.Programs
},
};
result.SetTitleHighlightData(StringMatcher.FuzzySearch(query, Name).MatchData);
result.TitleHighlightData = StringMatcher.FuzzySearch(query, Name).MatchData;
// Using CurrentCulture since this is user facing
var toolTipTitle = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", Properties.Resources.powertoys_run_plugin_program_file_name, result.Title);

View File

@@ -53,7 +53,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System
if (titleMatch.Score > 0)
{
c.Score = titleMatch.Score;
c.SetTitleHighlightData(titleMatch.MatchData);
c.TitleHighlightData = titleMatch.MatchData;
results.Add(c);
}
}