cljfx

Jeremy 2024-10-20T22:36:59.566739Z

Hi, I have no prior knowledge of javafx. How can I use something like atlantafx or jmetro or materal theme with cljfx?

Jeremy 2024-10-21T08:41:23.200839Z

the code on atlantafx github worked the same:

(import (javafx.application Application)
(javafx.stage Stage)
        (atlantafx.base.theme PrimerLight PrimerDark))
(defn set-theme
  "set atlantafx theme"
  [theme]
  (Application/setUserAgentStylesheet
   (.getUserAgentStylesheet (case theme
                              :light (PrimerLight.)
                              :dark (PrimerLight.))))
  (Application/setUserAgentStylesheet (.getUserAgentStylesheet (PrimerDark.))))
then (set-theme :light)

👍 1
vlaaad 2024-10-21T08:43:52.772609Z

yeah, it seems relatively straightforward with atlantafx

vlaaad 2024-10-21T08:44:03.280359Z

I got lost in material fx readme 😄