mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +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
@@ -4,5 +4,7 @@
|
||||
|
||||
<system:String x:Key="Microsoft_plugin_indexer_copy_path">Copy path (Ctrl+C)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_open_containing_folder">Open containing folder (Ctrl+Shift+E)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_name">Name</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -4,5 +4,7 @@
|
||||
|
||||
<system:String x:Key="Microsoft_plugin_indexer_copy_path">Copy path (Ctrl+C)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_open_containing_folder">Open containing folder (Ctrl+Shift+E)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_name">Name</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -4,5 +4,7 @@
|
||||
|
||||
<system:String x:Key="Microsoft_plugin_indexer_copy_path">Copy path (Ctrl+C)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_open_containing_folder">Open containing folder (Ctrl+Shift+E)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_name">Name</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -4,5 +4,7 @@
|
||||
|
||||
<system:String x:Key="Microsoft_plugin_indexer_copy_path">Copy path (Ctrl+C)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_open_containing_folder">Open containing folder (Ctrl+Shift+E)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_name">Name</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -4,5 +4,7 @@
|
||||
|
||||
<system:String x:Key="Microsoft_plugin_indexer_copy_path">Copy path (Ctrl+C)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_open_containing_folder">Open containing folder (Ctrl+Shift+E)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_name">Name</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -4,5 +4,7 @@
|
||||
|
||||
<system:String x:Key="Microsoft_plugin_indexer_copy_path">Copy path (Ctrl+C)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_open_containing_folder">Open containing folder (Ctrl+Shift+E)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_name">Name</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -4,5 +4,7 @@
|
||||
|
||||
<system:String x:Key="Microsoft_plugin_indexer_copy_path">Copy path (Ctrl+C)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_open_containing_folder">Open containing folder (Ctrl+Shift+E)</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_name">Name</system:String>
|
||||
<system:String x:Key="Microsoft_plugin_indexer_path">Path</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -65,7 +65,8 @@ namespace Microsoft.Plugin.Indexer
|
||||
foreach (var searchResult in searchResultsList)
|
||||
{
|
||||
var path = searchResult.Path;
|
||||
|
||||
var toolTipTitle = string.Format("{0} : {1}", _context.API.GetTranslation("Microsoft_plugin_indexer_name"), searchResult.Title);
|
||||
var toolTipText = string.Format("{0} : {1}", _context.API.GetTranslation("Microsoft_plugin_indexer_path"), path);
|
||||
string workingDir = null;
|
||||
if (_settings.UseLocationAsWorkingDir)
|
||||
workingDir = Path.GetDirectoryName(path);
|
||||
@@ -74,6 +75,7 @@ namespace Microsoft.Plugin.Indexer
|
||||
r.Title = searchResult.Title;
|
||||
r.SubTitle = "Search: " + path;
|
||||
r.IcoPath = path;
|
||||
r.ToolTipData = new ToolTipData(toolTipTitle, toolTipText);
|
||||
r.Action = c =>
|
||||
{
|
||||
bool hide;
|
||||
|
||||
Reference in New Issue
Block a user