Mercurial > hg > indyvon
changeset 132:77a3a609b2fe
Minor changes.
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Tue, 24 Apr 2012 18:47:31 +0400 |
parents | 24d4c9f3be90 |
children | 2c2e4c639311 |
files | src/net/kryshen/indyvon/component.clj |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/net/kryshen/indyvon/component.clj Fri Apr 13 20:26:21 2012 +0400 +++ b/src/net/kryshen/indyvon/component.clj Tue Apr 24 18:47:31 2012 +0400 @@ -27,10 +27,11 @@ (javax.swing JFrame JPanel JOptionPane))) (defn- paint-component [^Component c ^Graphics g scene] - (let [size (.getSize c)] + (let [w (.getWidth c) + h (.getHeight c)] (.setColor g (:back-color *theme*)) - (.fillRect g 0 0 (.width size) (.height size)) - (draw-scene! scene g (.width size) (.height size)))) + (.fillRect g 0 0 w h) + (draw-scene! scene g w h))) (defn- preferred-size [^Component c scene] (let [geom (scene-geometry scene)]