Use zip icon for zip files and subfolders

This commit is contained in:
John Lewin 2017-12-15 14:56:07 -08:00
parent 494c2b6d82
commit e0c08fd1fe
2 changed files with 7 additions and 0 deletions

View file

@ -29,8 +29,10 @@ either expressed or implied, of the FreeBSD Project.
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using MatterHackers.Agg.Image;
using MatterHackers.Agg.Platform;
namespace MatterHackers.MatterControl.Library
{
@ -48,6 +50,11 @@ namespace MatterHackers.MatterControl.Library
public virtual Task<ImageBuffer> GetThumbnail(ILibraryItem item, int width, int height)
{
if (item is LocalZipContainerLink)
{
return Task.FromResult(AggContext.StaticData.LoadIcon(Path.Combine("FileDialog", "folder_zip.png")).AlphaToPrimaryAccent());
}
return Task.FromResult<ImageBuffer>(null);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 685 B

Before After
Before After