Skip to content

Commit

Permalink
Fix issue #45: Preserve same font name when changing font size
Browse files Browse the repository at this point in the history
  • Loading branch information
jafingerhut committed May 21, 2012
1 parent e81de94 commit b45218f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clj_ns_browser/browser.clj
Expand Up @@ -90,13 +90,15 @@
(defn font-size+ (defn font-size+
"Increase the font-size of the widget w by 1." "Increase the font-size of the widget w by 1."
[w] [w]
(config! w :font {:size (+ 1 (.getSize (config w :font)))})) (let [f (config w :font)]
(config! w :font {:name (.getName f) :size (inc (.getSize f))})))




(defn font-size- (defn font-size-
"Decrease the font-size of the widget w by 1." "Decrease the font-size of the widget w by 1."
[w] [w]
(config! w :font {:size (- (.getSize (config w :font)) 1)})) (let [f (config w :font)]
(config! w :font {:name (.getName f) :size (dec (.getSize f))})))




;; constants and global maps shared by all seesaw widgets ;; constants and global maps shared by all seesaw widgets
Expand Down

0 comments on commit b45218f

Please sign in to comment.