use build-path to construct path segments instead of putting slashes into strings

This commit is contained in:
Robby Findler 2011-12-05 17:59:23 -06:00
parent 1d03e5f711
commit 7a5e90f48f

View File

@ -22,7 +22,7 @@
(let ([h (for/first ([h (in-list hs)] #:when (height . <= . h)) h)])
(if h h (last hs))))
(define icon-path
(build-path svg-icons-base-path (format "~a/~a/~a.png" category icon-height name)))
(build-path svg-icons-base-path category (format "~a" icon-height) (format "~a.png" name)))
(scale (bitmap icon-path) (/ height icon-height)))
(defproc (load-icon [category string?] [name string?] [height (>=/c 0)]) (is-a?/c bitmap%)