From c80233155f313a6f9e3d677d9377e4c8ac0dffc3 Mon Sep 17 00:00:00 2001 From: Seil0 Date: Tue, 4 Jun 2019 20:49:07 +0200 Subject: [PATCH] fixed cvSearch style not applying --- .../org/hso/texturesyncclient/app/Main.kt | 2 +- .../controller/Controller.kt | 1 - .../view/mainView/DetailView.kt | 6 +++--- .../view/mainView/FolderView.kt | 1 + .../view/mainView/MainView.kt | 19 ++++++------------- 5 files changed, 11 insertions(+), 18 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 838d174..3d0584c 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt @@ -7,7 +7,7 @@ import org.hso.texturesyncclient.view.mainView.MainViewController import org.hso.texturesyncclient.view.startupView.StartupView import tornadofx.App -class Main: App(StartupView::class){ +class Main: App(MainView::class){ val controller = RootController() diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/controller/Controller.kt b/client/src/main/kotlin/org/hso/texturesyncclient/controller/Controller.kt index feb76f6..2124bc3 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/controller/Controller.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/controller/Controller.kt @@ -85,7 +85,6 @@ class RootController : Controller() { fun initConnection(name: String) { try { con = Connection(InetAddress.getByName(name)) - println("ausgabe") con.ping() println("Connection successful") 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 67d3a5e..785d85a 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 @@ -26,9 +26,9 @@ class DetailView: View() { minWidth = 250.0 background = Background(BackgroundFill(Paint.valueOf("#9f9f9f"), CornerRadii.EMPTY, Insets.EMPTY)) - fieldset("DetailView", labelPosition = Orientation.VERTICAL) { + fieldset(labelPosition = Orientation.VERTICAL) { - field("3D Preview") { + field{ vbox(7) { add(preview) } @@ -38,7 +38,7 @@ class DetailView: View() { add(metaLabel) } - field("Tags") { + field { add(cvTags) } 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 e2d48fa..673f041 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 @@ -16,6 +16,7 @@ class FolderView : View("FolderView"){ prefWidth = 732.0 prefHeight = 1000.0 background = Background(BackgroundFill(Paint.valueOf("#cfcfcf"), CornerRadii.EMPTY, Insets.EMPTY)) + //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 3525b3d..2bcc874 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 @@ -2,10 +2,8 @@ package org.hso.texturesyncclient.view.mainView import com.jfoenix.controls.JFXChipView import com.jfoenix.controls.JFXSpinner -import com.jfoenix.controls.JFXTextField -import javafx.collections.ListChangeListener import javafx.geometry.Insets -import javafx.scene.image.Image + import javafx.scene.layout.Background import javafx.scene.layout.BackgroundFill import javafx.scene.layout.CornerRadii @@ -26,7 +24,6 @@ class MainView : View() { maxWidth = 1000.0 minHeight = 500.0 maxHeight = 500.0 - background = Background(BackgroundFill(Paint.valueOf("#2b2b2b"), CornerRadii.EMPTY, Insets.EMPTY)) left = vbox { prefWidth = 750.0 @@ -42,20 +39,16 @@ class MainView : View() { spinnerSearch.isVisible = false cvSearch.paddingAll = 7.0 - cvSearch.style = "-fx-background-color: #3c3f41; -fx-text-inner-color: #b15b2e;" // TODO fix text color - cvSearch.style { - minHeight = Dimension(74.0, Dimension.LinearUnits.px) - } + cvSearch.minHeight = 70.0 + cvSearch.style = "-fx-background-color: #3c3f41; -fx-text-inner-color: #b15b2e;" } // actions - cvSearch.chips.addListener { change: ListChangeListener.Change? -> - - mvc.cvSearchAction(cvSearch.chips) - + cvSearch.chips.onChange { + mvc.cvSearchAction(cvSearch.chips) } - detailView.cvTags.chips.addListener { change: ListChangeListener.Change? -> + detailView.cvTags.chips.onChange { mvc.updateTags() }