Skip to content

Commit bf01bfd

Browse files
committed
Third test
1 parent 6219f49 commit bf01bfd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public async Task LoadCardThumbnailAsync()
3838
{
3939
thumbnailData = await FileThumbnailHelper.LoadIconWithoutOverlayAsync(Item.Path, Constants.DefaultIconSizes.Jumbo, true, true);
4040

41+
if (thumbnailData is null || thumbnailData.Length == 0)
42+
thumbnailData = await FileThumbnailHelper.LoadIconWithoutOverlayAsync(Item.Path, Constants.DefaultIconSizes.Large, true, true);
43+
4144
// Thumbnail data is valid, set the item icon
4245
if (thumbnailData is not null && thumbnailData.Length > 0)
4346
Thumbnail = await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(() => thumbnailData.ToBitmapAsync(), Microsoft.UI.Dispatching.DispatcherQueuePriority.Low);

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,7 @@ 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_BIGGERSIZEOK | Shell32.SIIGBF.SIIGBF_SCALEUP;
259-
260-
if (getIconOnly)
261-
flags |= Shell32.SIIGBF.SIIGBF_ICONONLY;
258+
var flags = Shell32.SIIGBF.SIIGBF_ICONONLY;
262259

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

0 commit comments

Comments
 (0)