Skip to content

Commit 79df28b

Browse files
committed
Revert
1 parent bf01bfd commit 79df28b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Files.App/UserControls/Widgets/DrivesWidget.xaml.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ public DriveCardItem(DriveItem item)
3636

3737
public async Task LoadCardThumbnailAsync()
3838
{
39-
thumbnailData = await FileThumbnailHelper.LoadIconWithoutOverlayAsync(Item.Path, Constants.DefaultIconSizes.Jumbo, true, true);
40-
41-
if (thumbnailData is null || thumbnailData.Length == 0)
42-
thumbnailData = await FileThumbnailHelper.LoadIconWithoutOverlayAsync(Item.Path, Constants.DefaultIconSizes.Large, true, true);
39+
thumbnailData = await FileThumbnailHelper.LoadIconWithoutOverlayAsync(Item.Path, Constants.DefaultIconSizes.Large, true, true);
4340

4441
// Thumbnail data is valid, set the item icon
4542
if (thumbnailData is not null && thumbnailData.Length > 0)

src/Files.App/Utils/Shell/Win32API.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ public static (byte[]? icon, byte[]? overlay) GetFileIconAndOverlay(string path,
255255

256256
if (shellItem is not null && shellItem.IShellItem is Shell32.IShellItemImageFactory fctry)
257257
{
258-
var flags = Shell32.SIIGBF.SIIGBF_ICONONLY;
258+
var flags = Shell32.SIIGBF.SIIGBF_BIGGERSIZEOK;
259+
260+
if (getIconOnly)
261+
flags |= Shell32.SIIGBF.SIIGBF_ICONONLY;
259262

260263
var hres = fctry.GetImage(new SIZE(thumbnailSize, thumbnailSize), flags, out var hbitmap);
261264
if (hres == HRESULT.S_OK)

0 commit comments

Comments
 (0)