improve UI by adding a background to images
This commit is contained in:
parent
395abd78b5
commit
0832a86810
2 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
|
||||
</padding>
|
||||
<HBox>
|
||||
<ImageView fx:id="imageView" />
|
||||
<StackPane style="-fx-background-color: lightgray;" prefWidth="244" prefHeight="244">
|
||||
<ImageView fx:id="imageView" />
|
||||
</StackPane>
|
||||
<VBox>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
|
||||
|
|
Loading…
Reference in a new issue