Skip to content

Commit 8aa7aa1

Browse files
committed
Minor improvements
1 parent 26a7935 commit 8aa7aa1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/cljfx/dev/validation.clj

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
(def ^:private help-ui-css
1818
(let [primary-color "#4E84E0"]
1919
(css/register ::css
20-
{".list-view"
20+
{"*" {:-fx-font-size 13 :-fx-font-family "system"}
21+
".list-view"
2122
{:-fx-background-color :transparent
2223
:-fx-border-width [0 1 0 0]
2324
:-fx-border-color "#aaa"
@@ -71,7 +72,8 @@
7172
:-fx-fixed-cell-size 24
7273
":focused > .virtual-flow > .clipped-container > .sheet > .tree-cell:focused"
7374
{:-fx-background-color primary-color}}
74-
".tree-cell" {:-fx-background-color :transparent}
75+
".tree-cell" {:-fx-background-color :transparent
76+
:-fx-text-fill "#000"}
7577
".inspector" {"-backdrop" {:-fx-background-color "#ccc"
7678
:-fx-effect "dropshadow(gaussian, #0006, 10, 0, 0, 5)"}
7779
"-root" {:-fx-pref-width 300
@@ -80,6 +82,7 @@
8082
:-fx-max-height 500
8183
:-fx-background-color :transparent}}
8284
".table" {"-view" {:-fx-background-color :transparent
85+
:-fx-fixed-cell-size 25
8386
:-fx-border-color ["#aaa" :transparent :transparent :transparent]
8487
"> .column-header-background"
8588
{:-fx-background-color :transparent
@@ -91,7 +94,7 @@
9194
":focused" {:-fx-background-color "#4E84E033"}}
9295
"-column" {:-fx-background-color :transparent
9396
:-fx-border-color [:transparent "#aaa" :transparent :transparent]
94-
" .label" {:-fx-alignment :center-left}}
97+
" .label" {:-fx-alignment :center-left :-fx-text-fill "#000"}}
9598
"-row-cell" {:-fx-background-color :transparent}}})))
9699

97100
(defn- type->string [type->id fx-type]
@@ -227,7 +230,9 @@
227230
{:text (str type (when text (str " - " (pr-str text))))}))
228231

229232
(defn on-inspector-tree-view-selection-changed [state {:keys [^TreeItem fx/event]}]
230-
(assoc state :path (subvec (:path (.getValue event)) 1)))
233+
(if event
234+
(assoc state :path (subvec (:path (.getValue event)) 1))
235+
(dissoc state :path)))
231236

232237
(defn- initialize-inspector-table! [^TableView table]
233238
(.selectFirst (.getSelectionModel table))
@@ -306,7 +311,7 @@
306311
(dispatchEvent [_ e next]
307312
(if (and (instance? KeyEvent e)
308313
(= KeyEvent/KEY_PRESSED (.getEventType e))
309-
(= KeyCode/ESCAPE (.getCode ^KeyEvent e)))
314+
(#{KeyCode/ESCAPE KeyCode/SPACE} (.getCode ^KeyEvent e)))
310315
e
311316
(.dispatchEvent dispatcher e next)))))))
312317

0 commit comments

Comments
 (0)