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 diff
1.1 --- a/src/indyvon/core.clj Wed Apr 16 00:10:48 2014 +0400 1.2 +++ b/src/indyvon/core.clj Wed Nov 12 15:44:17 2014 +0300 1.3 @@ -381,7 +381,7 @@ 1.4 (finally 1.5 (.dispose clip-g))))) 1.6 1.7 -(defn- ^Graphics2D apply-theme 1.8 +(defn ^Graphics2D apply-theme 1.9 "Set graphics' color and font to match theme. 1.10 Modifies and returns the first argument." 1.11 ([] 1.12 @@ -389,6 +389,7 @@ 1.13 ([^Graphics2D graphics theme] 1.14 (doto graphics 1.15 (.setColor (:fore-color theme)) 1.16 + (.setBackground (:back-color theme)) 1.17 (.setFont (:font theme))))) 1.18 1.19 (defn- ^Graphics2D create-graphics
2.1 --- a/src/indyvon/views.clj Wed Apr 16 00:10:48 2014 +0400 2.2 +++ b/src/indyvon/views.clj Wed Nov 12 15:44:17 2014 +0300 2.3 @@ -273,7 +273,9 @@ 2.4 (reify 2.5 View 2.6 (render! [_] 2.7 - (with-theme* theme render! view)) 2.8 + (with-theme theme 2.9 + (apply-theme) 2.10 + (render! view))) 2.11 (geometry [_] 2.12 (with-theme* theme geometry view)))) 2.13