Refactor search results styling
This commit is contained in:
parent
8c5ac438c2
commit
039efe8b6c
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
17
src/main/resources/css/search-results.css
Normal file
17
src/main/resources/css/search-results.css
Normal file
@ -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;*/
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<StackPane xmlns="http://javafx.com/javafx/23" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="com.marvinelsen.willow.ui.controllers.ListController"
|
||||
stylesheets="/css/main.css">
|
||||
stylesheets="/css/search-results.css">
|
||||
<ListView fx:id="listViewSearchResults" disable="true"/>
|
||||
<Label fx:id="labelNoEntriesFound" text="%list.no_entries_found" textAlignment="CENTER"
|
||||
visible="false" wrapText="true">
|
||||
|
Loading…
Reference in New Issue
Block a user