diff --git a/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt b/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt index b698015..a295788 100644 --- a/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt +++ b/src/main/kotlin/com/marvinelsen/willow/ui/cells/EntryCellFactory.kt @@ -72,7 +72,9 @@ internal class EntryCell(private val resources: ResourceBundle, private val conf rowValignment = VPos.BASELINE } - private val root = VBox(flowPane, labelDefinition) + private val root = VBox(flowPane, labelDefinition).apply { + styleClass.add("search-result") + } init { text = null diff --git a/src/main/resources/css/main.css b/src/main/resources/css/main.css index 87fdb11..e6a3a2c 100644 --- a/src/main/resources/css/main.css +++ b/src/main/resources/css/main.css @@ -2,41 +2,6 @@ -fx-font-family: "Inter Variable"; } -.chinese { - -fx-font-family: "Noto Sans CJK TC"; -} - -.list-view { - -fx-selection-bar: #B8EEFF; - /*-fx-selection-bar-non-focused: green;*/ -} - -.list-view-entry { - -fx-font-family: "Noto Sans TC"; - -fx-font-size: 20; - -fx-font-weight: bold; -} - -.list-view-definition { - -fx-font-size: 14; -} - -.list-view-pronunciation { - -fx-font-size: 14; -} - -.list-view-sentence-cell { - -fx-font-size: 16; -} - -.moe-definition { - -fx-font-size: 16; -} - -.pronunciation { +.details-pronunciation { -fx-font: 16 "Noto Sans TC"; -} - -.preferences-dialog .content { - -fx-padding: 0; -} +} \ No newline at end of file diff --git a/src/main/resources/css/search-results.css b/src/main/resources/css/search-results.css new file mode 100644 index 0000000..5383018 --- /dev/null +++ b/src/main/resources/css/search-results.css @@ -0,0 +1,17 @@ +.list-view:focused .list-cell:filled:focused:selected .search-result { + /*-fx-text-fill: red;*/ +} + +.headword { + -fx-font-family: "Noto Sans TC"; + -fx-font-weight: bold; + /*-fx-text-fill: inherit;*/ +} + +.pronunciation { + /*-fx-text-fill: inherit;*/ +} + +.definition { + /*-fx-text-fill: inherit;*/ +} \ No newline at end of file diff --git a/src/main/resources/fxml/list.fxml b/src/main/resources/fxml/list.fxml index 2c6a988..48f7c05 100644 --- a/src/main/resources/fxml/list.fxml +++ b/src/main/resources/fxml/list.fxml @@ -7,7 +7,7 @@ + stylesheets="/css/search-results.css">