|
1 | 1 | (in-ns 'cljfx.dev)
|
2 |
| -(import '[javafx.scene.input KeyEvent] |
3 |
| - '[javafx.stage Popup] |
4 |
| - '[javafx.scene Node]) |
5 |
| -(require '[cljfx.ext.list-view :as fx.ext.list-view] |
6 |
| - '[cljfx.prop :as prop] |
7 |
| - '[cljfx.mutator :as mutator] |
8 |
| - '[cljfx.component :as component] |
9 |
| - '[cljfx.css :as css]) |
10 | 2 |
|
11 |
| -(def ^:private help-ui-css |
12 |
| - (css/register ::css |
13 |
| - {".list-view" |
14 |
| - {:-fx-background-color :transparent |
15 |
| - :-fx-border-width [0 1 0 0] |
16 |
| - :-fx-border-color "#aaa" |
17 |
| - ":focused > .virtual-flow > .clipped-container > .sheet > .list-cell:focused" |
18 |
| - {:-fx-background-color "#4E84E0"}} |
19 |
| - ".tab-pane:focused > .tab-header-area > .headers-region > .tab:selected .focus-indicator" |
20 |
| - {:-fx-border-color "#4E84E0" |
21 |
| - :-fx-border-width 2 |
22 |
| - :-fx-border-insets [-4 -4 -15 -5] |
23 |
| - :-fx-border-radius "5"} |
24 |
| - ".tab" {:-fx-background-color "#aaa, #c2c2c2" |
25 |
| - :-fx-background-radius "6 6 0 0, 5 5 0 0" |
26 |
| - ":selected" {:-fx-background-color "#aaa, #ccc"}} |
27 |
| - ".tab-header-background" {:-fx-background-color "#aaa, #ccc, #ccc"} |
28 |
| - ".popup-root" {:-fx-background-color "#ddd" |
29 |
| - :-fx-effect "dropshadow(gaussian, #0006, 8, 0, 0, 2)"} |
30 |
| - ".filter-term" {:-fx-background-color "#42B300" |
31 |
| - :-fx-background-radius 2 |
32 |
| - :-fx-effect "dropshadow(gaussian, #0006, 4, 0, 0, 2)" |
33 |
| - :-fx-padding [2 4]} |
34 |
| - ".list-cell" {:-fx-background-color :transparent |
35 |
| - :-fx-text-fill "#000" |
36 |
| - :-fx-font-size 14 |
37 |
| - :-fx-padding [2 4] |
38 |
| - ":selected" {:-fx-background-color "#4E84E033"}} |
39 |
| - ".text-area" {:-fx-background-color :transparent |
40 |
| - :-fx-focus-traversable false |
41 |
| - :-fx-text-fill "#000" |
42 |
| - " .content" {:-fx-background-color :transparent}} |
43 |
| - ".scroll-pane" {:-fx-background-color :transparent |
44 |
| - :-fx-padding 0 |
45 |
| - "> .viewport" {:-fx-background-color :transparent}} |
46 |
| - ".scroll-bar" {:-fx-background-color :transparent |
47 |
| - "> .thumb" {:-fx-background-color "#999" |
48 |
| - :-fx-background-insets 0 |
49 |
| - :-fx-background-radius 4 |
50 |
| - ":hover" {:-fx-background-color "#9c9c9c"} |
51 |
| - ":pressed" {:-fx-background-color "#aaa"}} |
52 |
| - ":horizontal" {"> .increment-button > .increment-arrow" {:-fx-pref-height 7} |
53 |
| - "> .decrement-button > .decrement-arrow" {:-fx-pref-height 7}} |
54 |
| - ":vertical" {"> .increment-button > .increment-arrow" {:-fx-pref-width 7} |
55 |
| - "> .decrement-button > .decrement-arrow" {:-fx-pref-width 7}} |
56 |
| - "> .decrement-button" {:-fx-padding 0 |
57 |
| - "> .decrement-arrow" {:-fx-shape nil |
58 |
| - :-fx-padding 0}} |
59 |
| - "> .increment-button" {:-fx-padding 0 |
60 |
| - "> .increment-arrow" {:-fx-shape nil |
61 |
| - :-fx-padding 0}}} |
62 |
| - ".corner" {:-fx-background-color :transparent}})) |
| 3 | +(require '[cljfx.ext.list-view :as fx.ext.list-view]) |
63 | 4 |
|
64 | 5 | (defn- set-help-ui-selection [state {:keys [key fx/event]}]
|
65 | 6 | (update state key assoc :selection event))
|
|
0 commit comments