Hacker News new | ask | show | jobs
by capableweb 2274 days ago
Love the example with the spacer, guess we're back to building UIs with tables soon as well!

  (defn counter [num]
    (horizontal-layout
     (on :mouse-down (fn [[mouse-x mouse-y]]
                       (swap! counter-state inc)
                       nil)
         (button "more!"))
     (spacer 5 0)
     (label num (ui/font nil 19))))

Otherwise, haven't heard about Skia before, so thanks for sharing that, looks really nifty.
1 comments

Thanks! More complicated layout strategies are easy to integrate, but spacer works really well for examples since most people can intuit what the result will look like.

Skia has worked well so far. Since it's used by Chrome, Android, and Firefox under the hood, it means that I can reach a lot of platforms "for free".