New Features #1

Open
marvinelsen wants to merge 95 commits from develop into main
Showing only changes of commit e4f7e8ee5d - Show all commits

View File

@ -49,13 +49,6 @@ class PreferencesDialogController(private val config: Config) {
@FXML
private lateinit var spinnerDefinitionFontSizeSearchResults: Spinner<Int>
private val entryHeadwordFontSizeObjectProperty = config.details.headwordFontSize.asObject()
private val entryPronunciationFontSizeObjectProperty = config.details.pronunciationFontSize.asObject()
private val searchResultHeadwordFontSizeObjectProperty = config.searchResults.headwordFontSize.asObject()
private val searchResultPronunciationFontSizeObjectProperty = config.searchResults.pronunciationFontSize.asObject()
private val searchResultDefinitionFontSizeObjectProperty = config.searchResults.definitionFontSize.asObject()
@FXML
private fun initialize() {
comboBoxLocale.items.addAll(
@ -82,27 +75,42 @@ class PreferencesDialogController(private val config: Config) {
with(spinnerHeadwordFontSizeDetails) {
editor.textFormatter = FontSizeTextFormatter()
valueFactory.valueProperty().bindBidirectional(entryHeadwordFontSizeObjectProperty)
valueFactory.value = config.details.headwordFontSize.value
valueProperty().addListener { _, _, newValue ->
config.details.headwordFontSize.value = newValue
}
}
with(spinnerPronunciationFontSizeDetails) {
editor.textFormatter = FontSizeTextFormatter()
valueFactory.valueProperty().bindBidirectional(entryPronunciationFontSizeObjectProperty)
valueFactory.value = config.details.pronunciationFontSize.value
valueProperty().addListener { _, _, newValue ->
config.details.pronunciationFontSize.value = newValue
}
}
with(spinnerHeadwordFontSizeSearchResults) {
editor.textFormatter = FontSizeTextFormatter()
valueFactory.valueProperty().bindBidirectional(searchResultHeadwordFontSizeObjectProperty)
valueFactory.value = config.searchResults.headwordFontSize.value
valueProperty().addListener { _, _, newValue ->
config.searchResults.headwordFontSize.value = newValue
}
}
with(spinnerPronunciationFontSizeSearchResults) {
editor.textFormatter = FontSizeTextFormatter()
valueFactory.valueProperty().bindBidirectional(searchResultPronunciationFontSizeObjectProperty)
valueFactory.value = config.searchResults.pronunciationFontSize.value
valueProperty().addListener { _, _, newValue ->
config.searchResults.pronunciationFontSize.value = newValue
}
}
with(spinnerDefinitionFontSizeSearchResults) {
editor.textFormatter = FontSizeTextFormatter()
valueFactory.valueProperty().bindBidirectional(searchResultDefinitionFontSizeObjectProperty)
valueFactory.value = config.searchResults.definitionFontSize.value
valueProperty().addListener { _, _, newValue ->
config.searchResults.definitionFontSize.value = newValue
}
}
}
}