From 187bf80967810e3d0c406a6d063e4a7b2bdffbdf Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 25 Jun 2020 00:26:15 +0200 Subject: [PATCH] Fixed auto complete ListView height so that it doesn't hide / cut items --- build.gradle | 2 +- .../dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt | 2 ++ .../javafx/dialogs/cashtransfer/RemitteeListCellFragment.kt | 5 +++++ .../ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 578fd929..207cf4a6 100644 --- a/build.gradle +++ b/build.gradle @@ -69,7 +69,7 @@ ext { /* JavaFX */ - javaFxUtilsVersion = '1.0.7' + javaFxUtilsVersion = '1.0.8-SNAPSHOT' /* Test */ diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt index f04d4e15..c435e2ec 100755 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt @@ -90,6 +90,8 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window( onAutoCompletion = { bankSelected(it) } listCellFragment = BankInfoListCellFragment::class + setPrefItemHeight(BankInfoListCellFragment.ItemHeight) + vboxConstraints { margin = TextFieldMargins } diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/RemitteeListCellFragment.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/RemitteeListCellFragment.kt index f75049b7..fe45e043 100644 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/RemitteeListCellFragment.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/RemitteeListCellFragment.kt @@ -6,6 +6,11 @@ import tornadofx.* open class RemitteeListCellFragment : ListCellFragment() { + companion object { + const val ItemHeight = 60.0 + } + + open val remittee = RemitteeViewModel().bindTo(this) diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt index d020e8c7..fe27881e 100644 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt @@ -141,6 +141,8 @@ open class TransferMoneyDialog @JvmOverloads constructor( onAutoCompletion = { remitteeSelected(it) } listCellFragment = RemitteeListCellFragment::class + + setPrefItemHeight(RemitteeListCellFragment.ItemHeight) } }