Refactor search results styling

This commit is contained in:
Marvin Elsen 2024-09-28 16:12:40 +02:00
parent 8c5ac438c2
commit 039efe8b6c
Signed by: marvinelsen
GPG Key ID: 820672408CC318C2
4 changed files with 23 additions and 39 deletions

View File

@ -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

View File

@ -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;
}

View 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;*/
}

View File

@ -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">