diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt index 46db4d4..3fbb4e9 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt @@ -29,8 +29,6 @@ import java.nio.file.Files import java.io.FileOutputStream import java.io.IOException import java.text.SimpleDateFormat -import java.text.DateFormat - class RootController : Controller() { @@ -230,18 +228,9 @@ class RootController : Controller() { */ fun showDetail(data: Texture) { mvc.setPreview3DTexture(con.getTexturePreview(data.textureHash)) - val sdf = SimpleDateFormat("dd.MM.yyyy") - - - - mvc.setMeta( - data.name, - "${data.resolution.first.toString()}px x ${data.resolution.second.toString()}px", - data.format.toString(), - sdf.format(data.addedOn.time) - ) + mvc.setMeta(data.name, "${data.resolution.first}px x ${data.resolution.second}px", data.format.toString(), sdf.format(data.addedOn.time)) mvc.setTags(data.tags.toList().observable()) selectedTexture = data } diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/error.kt b/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/error.kt index c43d785..fa693a1 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/error.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/controller/net/error.kt @@ -6,7 +6,7 @@ import java.lang.Exception sealed class ConnectionException(override val message: String) : Exception(message) -class ConnectionErrorException(val errorCode: Int, val errorMessage: String) : +class ConnectionErrorException(errorCode: Int, errorMessage: String) : ConnectionException("$errorCode $errorMessage") { internal constructor(err: ErrorPackage) : this(err.code, err.message) } 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 bdc27b5..6a68f04 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 @@ -15,21 +15,20 @@ import tornadofx.* class DetailView: View() { - private val mvc: MainViewController by inject() - val preview = Preview3D() - val metaLabel = Label("Auflösung: 8MP\nName: Texture.png\nAndere: was anderes") + val metaLabel = Label("Auflösung: 8MP\nName: Texture.png\nAndere: was anderes\nEinfügedatum: 31.02.2019") val cvTags = JFXChipView() val btnImport = JFXButton("+") init { // set a default texture preview.setTexture(Image("textures/sample_texture_1.jpg")) + //preview.setTexture(Image("icons/TextureSync_Icon_256x256.jpg")) } override val root = form { minWidth = 250.0 - background = Background(BackgroundFill(Paint.valueOf("#9f9f9f"), CornerRadii.EMPTY, Insets.EMPTY)) + background = Background(BackgroundFill(Paint.valueOf("#3a3a3a"), CornerRadii.EMPTY, Insets.EMPTY)) fieldset(labelPosition = Orientation.VERTICAL) { @@ -40,11 +39,13 @@ class DetailView: View() { } field { + paddingTop = 2 + paddingBottom = 3 add(metaLabel) } field { - minHeight = 145.0 + minHeight = 155.0 add(cvTags) } @@ -58,12 +59,14 @@ class DetailView: View() { } style { - cvTags.minHeight = 135.0 + metaLabel.style = "-fx-text-fill: #2b7bbb;" + + cvTags.minHeight = 145.0 cvTags.paddingAll = 3.0 cvTags.style = "-fx-background-color: #53585b; -fx-text-inner-color: #b15b2e;" btnImport.buttonType = JFXButton.ButtonType.RAISED - btnImport.styleClass.add("jfx-floating-action-button"); + btnImport.styleClass.add("jfx-floating-action-button") } } diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/Preview3D.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/Preview3D.kt index e4eae89..5496717 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/Preview3D.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/Preview3D.kt @@ -56,7 +56,7 @@ class Preview3D : View("Preview3D") { style { minWidth = 200.px minHeight = 200.px - background = Background(BackgroundFill(Color.valueOf("#9f9f9f"), CornerRadii.EMPTY, Insets.EMPTY)) + background = Background(BackgroundFill(Color.valueOf("#3a3a3a"), CornerRadii.EMPTY, Insets.EMPTY)) } } diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/startupView/StartupViewController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/startupView/StartupViewController.kt index 91146ba..6da18ba 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/startupView/StartupViewController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/startupView/StartupViewController.kt @@ -23,7 +23,7 @@ class StartupViewController : Controller() { } fun setServerAddress(address: String) { - sv.tfServerIP.text = address + //sv.tfServerIP.text = address sv.tfServerIP.isFocusTraversable = false } diff --git a/client/src/main/resources/icons/TextureSync_Icon_256x256.jpeg b/client/src/main/resources/icons/TextureSync_Icon_256x256.jpeg new file mode 100644 index 0000000..b1e155f Binary files /dev/null and b/client/src/main/resources/icons/TextureSync_Icon_256x256.jpeg differ