diff --git a/CHANGELOG.md b/CHANGELOG.md index f36f5e1e25..1573aaf1b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Wrong main class in build config of bgw-net protocol client +- Prompt text displayed twice in ComboBox. ## [0.7.2] - 14.08.2022 diff --git a/bgw-gui/src/main/kotlin/tools/aqua/bgw/builder/UINodeBuilder.kt b/bgw-gui/src/main/kotlin/tools/aqua/bgw/builder/UINodeBuilder.kt index 1a79541792..6ddc80ea50 100644 --- a/bgw-gui/src/main/kotlin/tools/aqua/bgw/builder/UINodeBuilder.kt +++ b/bgw-gui/src/main/kotlin/tools/aqua/bgw/builder/UINodeBuilder.kt @@ -261,9 +261,12 @@ object UINodeBuilder { object : ListCell() { override fun updateItem(item: T, empty: Boolean) { super.updateItem(item, empty) - this.style = comboBox.font.toFXFontCSS() - this.textFill = comboBox.font.color.toFXColor() - if (!empty) { + + if (empty) { + this.textFill = Color(0F, 0F, 0F, 0F).toFXColor() + } else { + this.style = comboBox.font.toFXFontCSS() + this.textFill = comboBox.font.color.toFXColor() this.text = comboBox.formatFunction?.invoke(item) ?: item.toString() } }