mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Tooltip for indexer and program plugin (#4589)
* Fix multiline title issue * Added code to display tooltip for program and indexer plugin * Added tests for Result class * Theme based color for tooltip * Added colors for tooltip * Added string tags to tooltip * Add initial show delay * Seperated textbox for title and path
This commit is contained in:
committed by
GitHub
parent
1533c9315f
commit
8d72bc0ea4
@@ -39,5 +39,7 @@
|
||||
<system:String x:Key="powertoys_run_plugin_program_internet_shortcut_application">Weblink-Anwendung</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_web_application">Web-Anwendung</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_run_command">Run command</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_name">Name</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -50,4 +50,6 @@
|
||||
<system:String x:Key="powertoys_run_plugin_program_internet_shortcut_application">Internet shortcut application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_web_application">Web application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_run_command">Run command</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_name">Name</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_path">Path</system:String>
|
||||
</ResourceDictionary>
|
||||
@@ -40,5 +40,7 @@
|
||||
<system:String x:Key="powertoys_run_plugin_program_internet_shortcut_application">Internet shortcut application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_web_application">Web application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_run_command">Run command</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_name">Name</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -39,5 +39,7 @@
|
||||
<system:String x:Key="powertoys_run_plugin_program_internet_shortcut_application">Internet shortcut application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_web_application">Web application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_run_command">Run command</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_name">Name</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -41,5 +41,7 @@
|
||||
<system:String x:Key="powertoys_run_plugin_program_internet_shortcut_application">Internet shortcut application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_web_application">Web application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_run_command">Run command</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_name">Name</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -41,5 +41,7 @@
|
||||
<system:String x:Key="powertoys_run_plugin_program_internet_shortcut_application">Internet shortcut application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_web_application">Web application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_run_command">Run command</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_name">Name</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -39,5 +39,7 @@
|
||||
<system:String x:Key="powertoys_run_plugin_program_internet_shortcut_application">Internet shortcut application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_web_application">Web application</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_run_command">Run command</system:String>
|
||||
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_name">Name</system:String>
|
||||
<system:String x:Key="powertoys_run_plugin_program_file_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -301,7 +301,12 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
{
|
||||
result.Title = DisplayName;
|
||||
result.TitleHighlightData = StringMatcher.FuzzySearch(query, DisplayName).MatchData;
|
||||
}
|
||||
}
|
||||
|
||||
var toolTipTitle = string.Format("{0} : {1}", api.GetTranslation("powertoys_run_plugin_program_file_name"), result.Title);
|
||||
var toolTipText = string.Format("{0} : {1}", api.GetTranslation("powertoys_run_plugin_program_file_path"), Package.Location);
|
||||
result.ToolTipData = new ToolTipData(toolTipTitle, toolTipText);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -199,6 +199,10 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
result.TitleHighlightData = StringMatcher.FuzzySearch(query, Name).MatchData;
|
||||
}
|
||||
|
||||
var toolTipTitle = string.Format("{0} : {1}", api.GetTranslation("powertoys_run_plugin_program_file_name"), result.Title);
|
||||
var toolTipText = string.Format("{0} : {1}", api.GetTranslation("powertoys_run_plugin_program_file_path"), FullPath);
|
||||
result.ToolTipData = new ToolTipData(toolTipTitle, toolTipText);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user