use Borderpane + Anchorpane for #40
This commit is contained in:
parent
cac4807357
commit
f5dbcc0134
|
@ -19,9 +19,9 @@ class Main : App(StartupView::class) {
|
||||||
// a different min-size.
|
// a different min-size.
|
||||||
super.start(stage)
|
super.start(stage)
|
||||||
|
|
||||||
stage.minWidth = 1008.00
|
stage.minWidth = 1050.00
|
||||||
stage.minHeight = 700.00
|
stage.minHeight = 700.00
|
||||||
stage.width = 1008.00
|
stage.width = 1050.00
|
||||||
stage.height = 700.00
|
stage.height = 700.00
|
||||||
stage.isResizable = true
|
stage.isResizable = true
|
||||||
stage.icons.add(Image("icons/TextureSync_Icon_256x256.png"))
|
stage.icons.add(Image("icons/TextureSync_Icon_256x256.png"))
|
||||||
|
|
|
@ -20,28 +20,32 @@ class MainView : View("TextureSync") {
|
||||||
private val mvc: MainViewController by inject()
|
private val mvc: MainViewController by inject()
|
||||||
|
|
||||||
override val root = anchorpane {
|
override val root = anchorpane {
|
||||||
|
|
||||||
background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
|
background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
|
||||||
prefWidth = FX.primaryStage.width
|
prefWidth = FX.primaryStage.width
|
||||||
prefHeight = FX.primaryStage.height
|
prefHeight = FX.primaryStage.height
|
||||||
|
|
||||||
add(cvSearch)
|
borderpane {
|
||||||
|
right = detailView.root
|
||||||
|
center = vbox {
|
||||||
|
add(cvSearch)
|
||||||
|
scrollpane {
|
||||||
|
style = "-fx-background-color:transparent;"
|
||||||
|
isFitToWidth = true
|
||||||
|
isFitToHeight = true
|
||||||
|
|
||||||
scrollpane {
|
add(folderView.root)
|
||||||
style = "-fx-background-color:transparent;"
|
}
|
||||||
isFitToWidth = true
|
}
|
||||||
isFitToHeight = true
|
|
||||||
|
|
||||||
add(folderView.root)
|
|
||||||
|
|
||||||
anchorpaneConstraints {
|
anchorpaneConstraints {
|
||||||
topAnchor = 106
|
topAnchor = 0
|
||||||
bottomAnchor = 0
|
bottomAnchor = 0
|
||||||
|
rightAnchor = 0
|
||||||
leftAnchor = 0
|
leftAnchor = 0
|
||||||
rightAnchor = 255
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
add(detailView)
|
|
||||||
add(btnImport)
|
add(btnImport)
|
||||||
|
|
||||||
style {
|
style {
|
||||||
|
@ -49,17 +53,6 @@ class MainView : View("TextureSync") {
|
||||||
cvSearch.paddingAll = 5.0
|
cvSearch.paddingAll = 5.0
|
||||||
cvSearch.minHeight = 65.0
|
cvSearch.minHeight = 65.0
|
||||||
cvSearch.style = "-fx-background-color: #53585b; -fx-text-inner-color: #b15b2e;"
|
cvSearch.style = "-fx-background-color: #53585b; -fx-text-inner-color: #b15b2e;"
|
||||||
cvSearch.anchorpaneConstraints {
|
|
||||||
topAnchor = 3
|
|
||||||
leftAnchor = 3
|
|
||||||
rightAnchor = 253
|
|
||||||
}
|
|
||||||
|
|
||||||
detailView.root.anchorpaneConstraints {
|
|
||||||
topAnchor = 0
|
|
||||||
bottomAnchor = 0
|
|
||||||
rightAnchor = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
btnImport.buttonType = JFXButton.ButtonType.RAISED
|
btnImport.buttonType = JFXButton.ButtonType.RAISED
|
||||||
btnImport.styleClass.add("jfx-floating-action-button")
|
btnImport.styleClass.add("jfx-floating-action-button")
|
||||||
|
|
Loading…
Reference in New Issue