Mercurial > hg > indyvon
changeset 157:4fea68ec12f4
Applying theme correctly.
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Wed, 12 Nov 2014 15:44:17 +0300 |
parents | dc13cacf3a43 |
children | e0063c1d0f7f |
files | src/indyvon/core.clj src/indyvon/views.clj |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/indyvon/core.clj Wed Apr 16 00:10:48 2014 +0400 +++ b/src/indyvon/core.clj Wed Nov 12 15:44:17 2014 +0300 @@ -381,7 +381,7 @@ (finally (.dispose clip-g))))) -(defn- ^Graphics2D apply-theme +(defn ^Graphics2D apply-theme "Set graphics' color and font to match theme. Modifies and returns the first argument." ([] @@ -389,6 +389,7 @@ ([^Graphics2D graphics theme] (doto graphics (.setColor (:fore-color theme)) + (.setBackground (:back-color theme)) (.setFont (:font theme))))) (defn- ^Graphics2D create-graphics
--- a/src/indyvon/views.clj Wed Apr 16 00:10:48 2014 +0400 +++ b/src/indyvon/views.clj Wed Nov 12 15:44:17 2014 +0300 @@ -273,7 +273,9 @@ (reify View (render! [_] - (with-theme* theme render! view)) + (with-theme theme + (apply-theme) + (render! view))) (geometry [_] (with-theme* theme geometry view))))