Don't include 2x version of icons that don't have a larger version.

This commit is contained in:
blitzmann
2018-10-13 20:49:56 -04:00
parent 20fbda9e7a
commit 7464de06b1
10 changed files with 5 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

View File

@@ -150,6 +150,11 @@ def get_icon_file(res_path, size):
if not os.path.isfile(fullpath):
return None
img = Image.open(fullpath)
if size > img.size:
# if we are requesting a size that is bigger than the source, return None. See #1769
return None
img = crop_image(img)
img.thumbnail(size, Image.ANTIALIAS)