Skip to content

Commit

Permalink
Fixed prompt text displayed twice in ComboBox. (#349)
Browse files Browse the repository at this point in the history
Closes #340.
  • Loading branch information
dominikmaeckel authored Aug 29, 2022
1 parent d5f7286 commit d6027cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,12 @@ object UINodeBuilder {
object : ListCell<T>() {
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()
}
}
Expand Down

0 comments on commit d6027cd

Please sign in to comment.