Make Client resizeable

This commit is contained in:
CodeSteak 2019-06-08 22:16:47 +02:00
parent f4db466b37
commit 36a8bccfe3
4 changed files with 22 additions and 27 deletions

View File

@ -15,7 +15,6 @@ class Main: App(StartupView::class){
stage.minWidth = 1000.00 stage.minWidth = 1000.00
stage.minHeight = 500.00 stage.minHeight = 500.00
stage.isResizable = false
stage.icons.add(Image("icons/TextureSync_Icon_256x256.jpeg")) stage.icons.add(Image("icons/TextureSync_Icon_256x256.jpeg"))
stage.setOnCloseRequest { System.exit(0) } stage.setOnCloseRequest { System.exit(0) }

View File

@ -54,7 +54,6 @@ class DetailView: View() {
add(btnImport) add(btnImport)
} }
} }
} }
style { style {

View File

@ -5,7 +5,10 @@ import javafx.scene.layout.Background
import javafx.scene.layout.BackgroundFill import javafx.scene.layout.BackgroundFill
import javafx.scene.layout.CornerRadii import javafx.scene.layout.CornerRadii
import javafx.scene.paint.Paint import javafx.scene.paint.Paint
import tornadofx.* import tornadofx.View
import tornadofx.flowpane
import tornadofx.paddingAll
import tornadofx.style
class FolderView : View("FolderView") { class FolderView : View("FolderView") {
@ -13,8 +16,7 @@ class FolderView : View("FolderView"){
hgap = 5.0 hgap = 5.0
vgap = 5.0 vgap = 5.0
paddingAll = 10.0 paddingAll = 10.0
prefWidth = 732.0
prefHeight = 401.0
background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY)) background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
style { style {

View File

@ -20,32 +20,28 @@ class MainView : View("TextureSync") {
override val root = borderpane { override val root = borderpane {
background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY)) background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY))
minWidth = 1000.0
maxWidth = 1000.0
minHeight = 500.0
maxHeight = 500.0
left = vbox { minWidth = 1000.0
//background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY)) minHeight = 500.0
anchorpane{
this.fitToParentWidth() right = detailView.root
paddingAll = 5.0 center = vbox {
add(cvSearch) add(cvSearch)
} add(
anchorpane {
scrollpane { scrollpane {
this.fitToParentSize() //this.fitToParentSize()
isFitToWidth = true
isFitToHeight = true
this.vbarPolicy = ScrollPane.ScrollBarPolicy.ALWAYS this.vbarPolicy = ScrollPane.ScrollBarPolicy.ALWAYS
add(folderView.root)
content = folderView.root
style = "-fx-background-color:transparent;" style = "-fx-background-color:transparent;"
} }
} )
} }
right = detailView.root
style { style {
cvSearch.promptText = "Suche" cvSearch.promptText = "Suche"
cvSearch.paddingAll = 5.0 cvSearch.paddingAll = 5.0
@ -72,7 +68,6 @@ class MainView : View("TextureSync") {
detailView.btnImport.setOnAction { detailView.btnImport.setOnAction {
mvc.btnImportAction() mvc.btnImportAction()
} }
} }
} }