mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
Adds support for JUMBO thumbnails in the helper (#38539)
Adds a parameter to `Toolkit.ThumbnailHelper.GetThumbnail` to retrieve the largest possible icon from the file. For most use cases, the normal icon size will be good for list items and page icons. But for details, you'll want to use the JUMBO icons, and to retrieve them, we need to get the icon from a different API. As a drive-by, I also have us fetching the highest-res app icon for UWP's rather than the lowest-res icon. Solves #38238 Screenshots: | before | after | | ------ | ----- | |  |  | |  |  |
This commit is contained in:
@@ -27,4 +27,10 @@ internal sealed class NativeMethods
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||
internal static extern bool DestroyIcon(IntPtr hIcon);
|
||||
|
||||
[DllImport("Shell32.dll", CharSet = CharSet.Unicode)]
|
||||
internal static extern int SHGetImageList(int iImageList, ref Guid riid, out IntPtr ppv);
|
||||
|
||||
[DllImport("comctl32.dll", SetLastError = true)]
|
||||
internal static extern int ImageList_GetIcon(IntPtr himl, int i, int flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user