From 87737a5261b49c662e2f339cf378c31c4e8c6b01 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Sat, 16 Nov 2024 19:27:51 +0200 Subject: [PATCH] fix about page text not displaying properly --- .idea/misc.xml | 1 - .../imagetagger/ui/controls/ImageTagsEntryControl.kt | 6 +++--- .../dev/nuculabs/imagetagger/ui/pages/about-page.fxml | 2 +- settings.gradle.kts | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index b249f47..6f8d2e0 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/controls/ImageTagsEntryControl.kt b/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/controls/ImageTagsEntryControl.kt index e361909..e35dca8 100644 --- a/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/controls/ImageTagsEntryControl.kt +++ b/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/controls/ImageTagsEntryControl.kt @@ -89,10 +89,10 @@ class ImageTagsEntryControl(private val image: AnalyzedImage) : HBox() { } setImage(image) if (image.hasError()) { - setText(listOf(image.errorMessage())) + setTags(listOf(image.errorMessage())) metadataVbox.isVisible = false } else { - setText(image.tags()) + setTags(image.tags()) setMetadata() } @@ -122,7 +122,7 @@ class ImageTagsEntryControl(private val image: AnalyzedImage) : HBox() { * * @param predictions The prediction list. */ - private fun setText(predictions: List) { + private fun setTags(predictions: List) { predictedImageTags.text = predictions.joinToString { it } } diff --git a/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml b/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml index 0daf40e..a0cc1bd 100644 --- a/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml +++ b/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml @@ -12,7 +12,7 @@ fx:controller="dev.nuculabs.imagetagger.ui.pages.AboutPage" stylesheets="@about-page.css" > - + diff --git a/settings.gradle.kts b/settings.gradle.kts index b58198d..2a71207 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,7 +1,7 @@ plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" } -rootProject.name = "ImageTagger-Solution" +rootProject.name = "ImageTagger" include("img-ui") include("img-ai") include("img-core")