Seil0
a82cef599c
* moved some style code to styles.css * adjust the background colors of the MainView
77 lines
2.0 KiB
Kotlin
77 lines
2.0 KiB
Kotlin
package org.hso.texturesyncclient.view.mainView
|
|
|
|
import com.jfoenix.controls.JFXChipView
|
|
import javafx.geometry.Insets
|
|
import javafx.scene.control.ScrollPane
|
|
|
|
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 folderView = find(FolderView::class)
|
|
val detailView = find(DetailView::class)
|
|
|
|
private val mvc: MainViewController by inject()
|
|
|
|
override val root = borderpane {
|
|
background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
|
|
minWidth = 1000.0
|
|
maxWidth = 1000.0
|
|
minHeight = 500.0
|
|
maxHeight = 500.0
|
|
|
|
left = vbox {
|
|
//background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
|
|
anchorpane{
|
|
this.fitToParentWidth()
|
|
paddingAll = 5.0
|
|
add(cvSearch)
|
|
}
|
|
anchorpane {
|
|
scrollpane {
|
|
this.fitToParentSize()
|
|
this.vbarPolicy = ScrollPane.ScrollBarPolicy.ALWAYS
|
|
add(folderView.root)
|
|
|
|
style = "-fx-background-color:transparent;"
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
right = detailView.root
|
|
|
|
style {
|
|
cvSearch.paddingAll = 5.0
|
|
cvSearch.minHeight = 70.0
|
|
cvSearch.style = "-fx-background-color: #53585b; -fx-text-inner-color: #b15b2e;"
|
|
cvSearch.anchorpaneConstraints {
|
|
topAnchor = 3
|
|
bottomAnchor = 3
|
|
leftAnchor = 3
|
|
rightAnchor = -5
|
|
}
|
|
|
|
}
|
|
|
|
// actions
|
|
cvSearch.chips.onChange {
|
|
mvc.cvSearchAction(cvSearch.chips)
|
|
}
|
|
|
|
detailView.cvTags.chips.onChange {
|
|
mvc.updateTags()
|
|
}
|
|
|
|
detailView.btnImport.setOnAction {
|
|
mvc.btnImportAction()
|
|
}
|
|
|
|
}
|
|
|
|
} |