73 lines
1.9 KiB
Kotlin
73 lines
1.9 KiB
Kotlin
package org.hso.texturesyncclient.view.mainView
|
|
|
|
import com.jfoenix.controls.JFXButton
|
|
import com.jfoenix.controls.JFXChipView
|
|
import javafx.geometry.Insets
|
|
import javafx.geometry.Orientation
|
|
import javafx.geometry.Pos
|
|
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\nEinfügedatum: 31.02.2019")
|
|
val cvTags = JFXChipView<String>()
|
|
val btnImport = JFXButton("+")
|
|
|
|
init {
|
|
// set a default texture
|
|
preview.setTexture(Image("textures/sample_texture_1.jpg"))
|
|
//preview.setTexture(Image("icons/TextureSync_Icon_256x256.jpg"))
|
|
}
|
|
|
|
override val root = form {
|
|
minWidth = 250.0
|
|
background = Background(BackgroundFill(Paint.valueOf("#3a3a3a"), CornerRadii.EMPTY, Insets.EMPTY))
|
|
|
|
fieldset(labelPosition = Orientation.VERTICAL) {
|
|
|
|
field{
|
|
vbox(7) {
|
|
add(preview)
|
|
}
|
|
}
|
|
|
|
field {
|
|
paddingTop = 2
|
|
paddingBottom = 3
|
|
add(metaLabel)
|
|
}
|
|
|
|
field {
|
|
minHeight = 155.0
|
|
add(cvTags)
|
|
|
|
}
|
|
|
|
field {
|
|
hbox(alignment = Pos.CENTER_RIGHT) {
|
|
add(btnImport)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
style {
|
|
metaLabel.style = "-fx-text-fill: #2b7bbb;"
|
|
|
|
cvTags.minHeight = 145.0
|
|
cvTags.paddingAll = 3.0
|
|
cvTags.style = "-fx-background-color: #53585b; -fx-text-inner-color: #b15b2e;"
|
|
|
|
btnImport.buttonType = JFXButton.ButtonType.RAISED
|
|
btnImport.styleClass.add("jfx-floating-action-button")
|
|
}
|
|
|
|
}
|
|
} |