Permalink
Browse files

(fixes #35) fixed :text-align to not to take needless padding at the top

  • Loading branch information...
1 parent 73acc63 commit aa6e730e6420a7f4db7bd3c9ac090c190e54a866 @fukamachi committed Dec 1, 2010
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/L5/layout.clj
  2. +4 −4 src/L5/slide.clj
View
@@ -27,7 +27,7 @@
(defmacro title [& strs]
`{:attr {:font-size (* 1.3 (:font-size (context)))
:text-align :center
- :padding {:bottom 20}}
+ :padding {:top 30}}
:body [~@strs]})
(defmacro lines [& strs]
View
@@ -32,13 +32,13 @@
(first
(filter #(gdev-contain? % bounds) (get-screen-devices)))))
-(defn fullscreen-gdev []
+(defn get-fullscreen-gdev []
(let [gdevs (filter #(.getFullScreenWindow %) (get-screen-devices))]
(if (empty? gdevs) nil (first gdevs))))
(defn fullscreen-off [context]
(let [frame @(:frame context)
- gdev (fullscreen-gdev)]
+ gdev (get-fullscreen-gdev)]
(when gdev
(.hide frame)
(.removeNotify frame)
@@ -55,7 +55,7 @@
(.setFullScreenWindow (detect-gdev frame) frame)))
(defn toggle-fullscreen [context]
- (let [gdev (fullscreen-gdev)]
+ (let [gdev (get-fullscreen-gdev)]
(if gdev
(fullscreen-off context)
(fullscreen-on context))))
@@ -68,7 +68,7 @@
(case vertical
:bottom (- height (.height bounds) (:top padding))
:middle (- (/ height 2) (:top padding))
- (.height bounds))])
+ 0)])
(defn- build-str-shape
([#^Graphics2D g, strs, font, width] (build-str-shape g strs font width :left))

0 comments on commit aa6e730

Please sign in to comment.