use Borderpane + Anchorpane for #40
This commit is contained in:
		@ -19,9 +19,9 @@ class Main : App(StartupView::class) {
 | 
			
		||||
        // a different min-size.
 | 
			
		||||
        super.start(stage)
 | 
			
		||||
 | 
			
		||||
        stage.minWidth = 1008.00
 | 
			
		||||
        stage.minWidth = 1050.00
 | 
			
		||||
        stage.minHeight = 700.00
 | 
			
		||||
        stage.width = 1008.00
 | 
			
		||||
        stage.width = 1050.00
 | 
			
		||||
        stage.height = 700.00
 | 
			
		||||
        stage.isResizable = true
 | 
			
		||||
        stage.icons.add(Image("icons/TextureSync_Icon_256x256.png"))
 | 
			
		||||
 | 
			
		||||
@ -20,28 +20,32 @@ class MainView : View("TextureSync") {
 | 
			
		||||
    private val mvc: MainViewController by inject()
 | 
			
		||||
 | 
			
		||||
    override val root = anchorpane {
 | 
			
		||||
 | 
			
		||||
        background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
 | 
			
		||||
        prefWidth = FX.primaryStage.width
 | 
			
		||||
        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 {
 | 
			
		||||
            style = "-fx-background-color:transparent;"
 | 
			
		||||
            isFitToWidth = true
 | 
			
		||||
            isFitToHeight = true
 | 
			
		||||
 | 
			
		||||
            add(folderView.root)
 | 
			
		||||
                    add(folderView.root)
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            anchorpaneConstraints {
 | 
			
		||||
                topAnchor = 106
 | 
			
		||||
                topAnchor = 0
 | 
			
		||||
                bottomAnchor = 0
 | 
			
		||||
                rightAnchor = 0
 | 
			
		||||
                leftAnchor = 0
 | 
			
		||||
                rightAnchor = 255
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        add(detailView)
 | 
			
		||||
        add(btnImport)
 | 
			
		||||
 | 
			
		||||
        style {
 | 
			
		||||
@ -49,17 +53,6 @@ class MainView : View("TextureSync") {
 | 
			
		||||
            cvSearch.paddingAll = 5.0
 | 
			
		||||
            cvSearch.minHeight = 65.0
 | 
			
		||||
            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.styleClass.add("jfx-floating-action-button")
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user