ui.images: load all UI images as 2x for retina displays.

master
John Benediktsson 2020-05-18 20:45:58 -07:00
parent 9635596b0b
commit 65a3f0b6f4
58 changed files with 4 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs cache combinators images.loader kernel
memoize namespaces opengl.textures sequences system
math memoize namespaces opengl.textures sequences system
ui.gadgets.worlds vocabs ;
IN: ui.images
@ -9,7 +9,8 @@ TUPLE: image-name path ;
C: <image-name> image-name
MEMO: cached-image ( image-name -- image ) path>> load-image ;
MEMO: cached-image ( image-name -- image )
path>> load-image t >>2x? ;
<PRIVATE
@ -29,7 +30,7 @@ PRIVATE>
rendered-image draw-scaled-texture ;
: image-dim ( image-name -- dim )
cached-image dim>> ;
cached-image dim>> [ 2 / ] map ;
{
{ [ os macosx? ] [ "images.loader.cocoa" require ] }

Binary file not shown.

Binary file not shown.

Binary file not shown.