mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
shortcut icons
This commit is contained in:
@@ -145,8 +145,12 @@ namespace ProjectsEditor.ViewModels
|
||||
shortcut.TargetPath = Path.Combine(basePath, "ProjectsLauncher.exe");
|
||||
shortcut.Arguments = '"' + project.Id + '"';
|
||||
shortcut.WorkingDirectory = basePath;
|
||||
string iconFilename = DrawHelper.CreateShortcutIcon(project, out Bitmap bitmap);
|
||||
shortcut.IconLocation = iconFilename;
|
||||
|
||||
string shortcutIconFilename = (string)shell.SpecialFolders.Item(ref shDesktop) + $"\\{project.Name}.ico";
|
||||
Bitmap icon = ProjectIcon.DrawIcon(ProjectIcon.IconTextFromProjectName(project.Name));
|
||||
ProjectIcon.SaveIcon(icon, shortcutIconFilename);
|
||||
|
||||
shortcut.IconLocation = shortcutIconFilename;
|
||||
shortcut.Save();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user