TextureSync/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainView.kt

57 lines
1.3 KiB
Kotlin

package org.hso.texturesyncclient.view.mainView
import com.jfoenix.controls.JFXChipView
import com.jfoenix.controls.JFXSpinner
import javafx.geometry.Insets
import javafx.scene.layout.Background
import javafx.scene.layout.BackgroundFill
import javafx.scene.layout.CornerRadii
import javafx.scene.paint.Paint
import tornadofx.*
class MainView : View() {
val cvSearch = JFXChipView<String>()
val spinnerSearch = JFXSpinner()
val folderView = find(FolderView::class)
val detailView = find(DetailView::class)
private val mvc: MainViewController by inject()
override val root = borderpane {
minWidth = 1000.0
maxWidth = 1000.0
minHeight = 500.0
maxHeight = 500.0
left = vbox {
prefWidth = 750.0
add(cvSearch)
scrollpane {
add(folderView.root)
}
}
right = detailView.root
style {
spinnerSearch.isVisible = false
cvSearch.paddingAll = 7.0
cvSearch.minHeight = 70.0
cvSearch.style = "-fx-background-color: #3c3f41; -fx-text-inner-color: #b15b2e;"
}
// actions
cvSearch.chips.onChange {
mvc.cvSearchAction(cvSearch.chips)
}
detailView.cvTags.chips.onChange {
mvc.updateTags()
}
}
}