mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-18 20:49:46 +01:00
shortcut icons
This commit is contained in:
@@ -271,27 +271,5 @@ namespace ProjectsEditor.Models
|
||||
|
||||
return new Rectangle((int)minX, (int)minY, (int)(maxX - minX), (int)(maxY - minY));
|
||||
}
|
||||
|
||||
internal string GetShortcutChars()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Name))
|
||||
{
|
||||
return "PR";
|
||||
}
|
||||
|
||||
string[] words = Name.Trim().ToUpperInvariant().Split(' ');
|
||||
if (words.Length > 2)
|
||||
{
|
||||
return $"{words[0][0]}{words[1][0]}{words[2][0]}";
|
||||
}
|
||||
else if (words.Length == 2)
|
||||
{
|
||||
return $"{words[0][0]}{words[1][0]}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return words[0].Substring(0, Math.Min(3, words[0].Length));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user