# HG changeset patch # User Mikhail Kryshen <mikhail@kryshen.net> # Date 1415796257 -10800 # Node ID 4fea68ec12f4b923b2a48eca9ac0b2a46d020724 # Parent dc13cacf3a43624b87ce25ef9af6c8e87a105574 Applying theme correctly. diff -r dc13cacf3a43 -r 4fea68ec12f4 src/indyvon/core.clj --- 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 diff -r dc13cacf3a43 -r 4fea68ec12f4 src/indyvon/views.clj --- 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))))