fix problem with @2x bitmaps on Mac OS X 10.5

This commit is contained in:
Matthew Flatt 2014-04-01 04:42:39 -06:00
parent 0a8b4f573b
commit 1273d0fbb3

View File

@ -67,7 +67,11 @@
(define (bitmap->image bm)
(define w (send bm get-width))
(define h (send bm get-height))
(define s (send bm get-backing-scale))
(define s (if (version-10.6-or-later?)
(send bm get-backing-scale)
;; In 10.5, `NSImage setSize:` clips instead of
;; scaling, so just use scale of 1:
1))
(cond
[(= s 1) (bitmap->image* bm w h w h)]
[else