53 lines
1.3 KiB
Kotlin
53 lines
1.3 KiB
Kotlin
package org.hso.texturesyncclient.view.mainView
|
|
|
|
import com.jfoenix.controls.JFXChipView
|
|
import javafx.geometry.Insets
|
|
import javafx.geometry.Orientation
|
|
import javafx.scene.control.Label
|
|
import javafx.scene.image.Image
|
|
import javafx.scene.layout.Background
|
|
import javafx.scene.layout.BackgroundFill
|
|
import javafx.scene.layout.CornerRadii
|
|
import javafx.scene.paint.Paint
|
|
import tornadofx.*
|
|
|
|
class DetailView: View() {
|
|
|
|
val preview = Preview3D()
|
|
val metaLabel = Label("Auflösung: 8MP\nName: Texture.png\nAndere: was anderes")
|
|
val cvTags = JFXChipView<String>()
|
|
|
|
init {
|
|
// set a default texture
|
|
preview.setTexture(Image("textures/sample_texture_1.jpg"))
|
|
}
|
|
|
|
override val root = form {
|
|
minWidth = 250.0
|
|
background = Background(BackgroundFill(Paint.valueOf("#9f9f9f"), CornerRadii.EMPTY, Insets.EMPTY))
|
|
|
|
fieldset(labelPosition = Orientation.VERTICAL) {
|
|
|
|
field{
|
|
vbox(7) {
|
|
add(preview)
|
|
}
|
|
}
|
|
|
|
field("Meta") {
|
|
add(metaLabel)
|
|
}
|
|
|
|
field {
|
|
add(cvTags)
|
|
}
|
|
|
|
// TODO add "Import" Btn
|
|
}
|
|
|
|
style {
|
|
cvTags.style = "-fx-background-color: #3c3f41; -fx-text-inner-color: #b15b2e;"
|
|
}
|
|
|
|
}
|
|
} |