diff --git a/src/vlaaad/reveal/action_popup.clj b/src/vlaaad/reveal/action_popup.clj index f223938..3864b6d 100644 --- a/src/vlaaad/reveal/action_popup.clj +++ b/src/vlaaad/reveal/action_popup.clj @@ -179,7 +179,6 @@ :desc {:fx/type fx/ext-let-refs :refs (into {::text-field {:fx/type :text-field :text-formatter rfx/code-text-formatter - :style-class "reveal-text-field" :text text :on-focused-changed {::event/type ::on-text-focused :id id} diff --git a/src/vlaaad/reveal/output_panel.clj b/src/vlaaad/reveal/output_panel.clj index 2a23c73..b5a0c2d 100644 --- a/src/vlaaad/reveal/output_panel.clj +++ b/src/vlaaad/reveal/output_panel.clj @@ -302,7 +302,6 @@ :children [{:fx/type fx/ext-on-instance-lifecycle :on-created init-text-field-created! :desc {:fx/type :text-field - :style-class "reveal-text-field" :prompt-text "Find..." :event-filter {::event/type ::on-search-event-filter :id id} :on-focused-changed {::event/type ::on-search-focus-changed :id id} diff --git a/src/vlaaad/reveal/style.clj b/src/vlaaad/reveal/style.clj index dba88eb..05ee05c 100644 --- a/src/vlaaad/reveal/style.clj +++ b/src/vlaaad/reveal/style.clj @@ -32,6 +32,7 @@ (delay (let [util-color (color :util) symbol-color (color :symbol) + scalar-color (color :scalar) unfocused-background-color (case @theme :dark "#333" :light "#f2f2f2") background-color (case @theme :dark "#232325" :light "#fafafa") scroll-bar-size 10 @@ -55,16 +56,6 @@ ":hover" {:-fx-text-fill symbol-color} "-selected" {:-fx-background-color selection-color :-fx-text-fill symbol-color}}} - "-text-field" {:-fx-font-family font-family - :-fx-text-fill symbol-color - :-fx-font-size font-size - :-fx-background-color background-color - :-fx-highlight-fill selection-color - :-fx-highlight-text-fill symbol-color - :-fx-padding [7 7] - ":focused" {:-fx-border-color selection-color - :-fx-border-width [0 0 2 0] - :-fx-padding [7 7 5 7]}} "-search" {:-fx-background-color popup-color :-fx-padding default-padding} "-summary" {:-fx-font-family font-family @@ -129,6 +120,23 @@ ":has-popup:focused" {:-fx-border-width [0 0 2 0] :-fx-padding [0 0 -2 0] :-fx-border-color selection-color}} + ".text-field" {:-fx-font-family font-family + :-fx-text-fill symbol-color + :-fx-font-size font-size + :-fx-background-color background-color + :-fx-highlight-fill selection-color + :-fx-highlight-text-fill symbol-color + :-fx-prompt-text-fill util-color + :-fx-background-radius 0 + :-fx-padding [7 7] + ":focused" {:-fx-border-color selection-color + :-fx-border-width [0 0 2 0] + :-fx-padding [7 7 5 7]}} + ".hyperlink" {:-fx-font-family font-family + :-fx-text-fill scalar-color + :-fx-padding 0 + :-fx-font-size font-size + ":focused" {:-fx-border-color scalar-color}} ".button" {:-fx-text-fill util-color :-fx-font-family font-family :-fx-font-size font-size diff --git a/src/vlaaad/reveal/ui.clj b/src/vlaaad/reveal/ui.clj index 4c3e915..75c1d10 100644 --- a/src/vlaaad/reveal/ui.clj +++ b/src/vlaaad/reveal/ui.clj @@ -343,55 +343,62 @@ :desc {:fx/type view/ext-try :desc (get-in views [id :desc])}}])) :desc {:fx/type fx/ext-let-refs - :refs (cond-> {::stage {:fx/type :stage - :title title - :on-close-request {::event/type ::confirm-exit} - :showing showing - :width 400 - :height 500 - :icons (if christmas - ["vlaaad/reveal/logo-xmas-16.png" - "vlaaad/reveal/logo-xmas-32.png" - "vlaaad/reveal/logo-xmas-64.png" - "vlaaad/reveal/logo-xmas-256.png" - "vlaaad/reveal/logo-xmas-512.png"] - ["vlaaad/reveal/logo-16.png" - "vlaaad/reveal/logo-32.png" - "vlaaad/reveal/logo-64.png" - "vlaaad/reveal/logo-256.png" - "vlaaad/reveal/logo-512.png"]) - :on-focused-changed {::event/type ::on-window-focused-changed} - :scene {:fx/type :scene - :stylesheets [(:cljfx.css/url @style/style)] - :root {:fx/type :grid-pane - :style-class "reveal-ui" - :column-constraints [{:fx/type :column-constraints - :hgrow :always}] - :row-constraints (let [n (inc (count result-trees))] - (repeat n {:fx/type :row-constraints - :percent-height (/ 100 n)})) - :children - (into [{:fx/type view/queue - :grid-pane/row 0 - :grid-pane/column 0 - :queue queue - :id :output}] - (map-indexed - (fn [i result-tree] - {:fx/type result-tree-view - :grid-pane/row (inc i) - :grid-pane/column 0 - :views views - :index i - :result-tree result-tree})) - result-trees)}}}} - confirm-exit-showing - (assoc ::confirm-exit {:fx/type confirm-exit-dialog}) + :refs (cond-> + {::stage {:fx/type :stage + :title title + :on-close-request {::event/type ::confirm-exit} + :showing showing + :width 400 + :height 500 + :icons (if christmas + ["vlaaad/reveal/logo-xmas-16.png" + "vlaaad/reveal/logo-xmas-32.png" + "vlaaad/reveal/logo-xmas-64.png" + "vlaaad/reveal/logo-xmas-256.png" + "vlaaad/reveal/logo-xmas-512.png"] + ["vlaaad/reveal/logo-16.png" + "vlaaad/reveal/logo-32.png" + "vlaaad/reveal/logo-64.png" + "vlaaad/reveal/logo-256.png" + "vlaaad/reveal/logo-512.png"]) + :on-focused-changed {::event/type ::on-window-focused-changed} + :scene + {:fx/type :scene + :stylesheets [(:cljfx.css/url @style/style)] + :root + {:fx/type :stack-pane + :children + [{:fx/type :grid-pane + :style-class "reveal-ui" + :column-constraints [{:fx/type :column-constraints + :hgrow :always}] + :row-constraints (let [n (inc (count result-trees))] + (repeat n {:fx/type :row-constraints + :percent-height (/ 100 n)})) + :children + (into [{:fx/type view/queue + :grid-pane/row 0 + :grid-pane/column 0 + :queue queue + :id :output}] + (map-indexed + (fn [i result-tree] + {:fx/type result-tree-view + :grid-pane/row (inc i) + :grid-pane/column 0 + :views views + :index i + :result-tree result-tree})) + result-trees)}]}}}} focus (assoc [::focus focus-key] {:fx/type ext-focused-by-default :desc {:fx/type fx/ext-get-ref :ref focus}})) - :desc {:fx/type fx/ext-get-ref :ref ::stage}}}) + :desc {:fx/type fx/ext-let-refs + :refs (cond-> {} + confirm-exit-showing + (assoc ::confirm-exit {:fx/type confirm-exit-dialog})) + :desc {:fx/type fx/ext-get-ref :ref ::stage}}}}) (defn oneduce ([xf x]