From 6b6ef67122068d183755a6559ae9df4c297c98b8 Mon Sep 17 00:00:00 2001 From: CodeSteak Date: Sat, 8 Jun 2019 22:16:47 +0200 Subject: [PATCH] Revert "Make Client resizeable" This reverts commit 36a8bccfe3f59c97e9d45218a3ffbdf418b38cc8. --- .../org/hso/texturesyncclient/app/Main.kt | 3 ++- .../view/mainView/DetailView.kt | 5 ++-- .../view/mainView/FolderView.kt | 10 +++---- .../view/mainView/MainView.kt | 27 +++++++++++-------- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt b/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt index 0b24133..3aff1e1 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt @@ -6,7 +6,7 @@ import org.hso.texturesyncclient.view.startupView.StartupView import org.hso.texturesyncclient.view.startupView.StartupViewController import tornadofx.App -class Main : App(StartupView::class) { +class Main: App(StartupView::class){ //start first controller private val svc = StartupViewController() @@ -15,6 +15,7 @@ class Main : App(StartupView::class) { stage.minWidth = 1000.00 stage.minHeight = 500.00 + stage.isResizable = false stage.icons.add(Image("icons/TextureSync_Icon_256x256.jpeg")) stage.setOnCloseRequest { System.exit(0) } diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt index 28bbeb2..ecb58ad 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt @@ -13,7 +13,7 @@ import javafx.scene.layout.CornerRadii import javafx.scene.paint.Paint import tornadofx.* -class DetailView : View() { +class DetailView: View() { val preview = Preview3D() val metaLabel = Label("Auflösung: 8MP\nName: Texture.png\nAndere: was anderes\nEinfügedatum: 31.02.2019") @@ -31,7 +31,7 @@ class DetailView : View() { fieldset(labelPosition = Orientation.VERTICAL) { - field { + field{ vbox(7) { add(preview) } @@ -54,6 +54,7 @@ class DetailView : View() { add(btnImport) } } + } style { diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/FolderView.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/FolderView.kt index d675d65..27ec6d7 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/FolderView.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/FolderView.kt @@ -5,18 +5,16 @@ import javafx.scene.layout.Background import javafx.scene.layout.BackgroundFill import javafx.scene.layout.CornerRadii import javafx.scene.paint.Paint -import tornadofx.View -import tornadofx.flowpane -import tornadofx.paddingAll -import tornadofx.style +import tornadofx.* -class FolderView : View("FolderView") { +class FolderView : View("FolderView"){ override val root = flowpane { hgap = 5.0 vgap = 5.0 paddingAll = 10.0 - + prefWidth = 732.0 + prefHeight = 401.0 background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY)) style { diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainView.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainView.kt index 0e51c69..1b0ca00 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainView.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainView.kt @@ -20,28 +20,32 @@ class MainView : View("TextureSync") { 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 - right = detailView.root - center = vbox { - add(cvSearch) - add( + left = vbox { + //background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY)) + anchorpane{ + this.fitToParentWidth() + paddingAll = 5.0 + add(cvSearch) + } + anchorpane { scrollpane { - //this.fitToParentSize() - isFitToWidth = true - isFitToHeight = true + this.fitToParentSize() this.vbarPolicy = ScrollPane.ScrollBarPolicy.ALWAYS - - content = folderView.root + add(folderView.root) style = "-fx-background-color:transparent;" } - ) + } } + right = detailView.root + style { cvSearch.promptText = "Suche" cvSearch.paddingAll = 5.0 @@ -68,6 +72,7 @@ class MainView : View("TextureSync") { detailView.btnImport.setOnAction { mvc.btnImportAction() } + } } \ No newline at end of file