From 0832a868109d7dd3fde1e8127db999745d572593 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Sat, 23 Mar 2024 17:37:15 +0200 Subject: [PATCH] improve UI by adding a background to images --- .../dev/imagetagger/ui/controls/ImageTagsEntryControl.kt | 6 +----- .../dev/imagetagger/ui/controls/image-tags-entry.fxml | 4 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/controls/ImageTagsEntryControl.kt b/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/controls/ImageTagsEntryControl.kt index f6bd608..8670a37 100644 --- a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/controls/ImageTagsEntryControl.kt +++ b/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/controls/ImageTagsEntryControl.kt @@ -58,11 +58,7 @@ class ImageTagsEntryControl */ fun setImage(imagePath: String) { File(imagePath).inputStream().use { - imageView.image = Image(it) - imageView.resize(244.0, 244.0) - imageView.fitHeight = 244.0 - imageView.fitWidth = 244.0 - imageView.isSmooth = true + imageView.image = Image(it, 244.0, 244.0, true, true) imageView.isCache = true } } diff --git a/src/main/resources/com/nuculabs/dev/imagetagger/ui/controls/image-tags-entry.fxml b/src/main/resources/com/nuculabs/dev/imagetagger/ui/controls/image-tags-entry.fxml index 96e20fd..56d950e 100644 --- a/src/main/resources/com/nuculabs/dev/imagetagger/ui/controls/image-tags-entry.fxml +++ b/src/main/resources/com/nuculabs/dev/imagetagger/ui/controls/image-tags-entry.fxml @@ -10,7 +10,9 @@ - + + +