Compare commits

..

No commits in common. "fc5db5d0510880478de9dd4bdfc0dc939fb8c2fb" and "a82cef599c971090f1454f448683f64d488bc2dc" have entirely different histories.

4 changed files with 5 additions and 16 deletions

View File

@ -8,8 +8,7 @@ import tornadofx.App
class Main: App(StartupView::class){ class Main: App(StartupView::class){
//start first controller //start first controller
private val svc = StartupViewController() private val svc = StartupViewController()
override fun start(stage: Stage) { override fun start(stage: Stage) {
super.start(stage) super.start(stage)

View File

@ -26,10 +26,6 @@ import javax.imageio.ImageIO
import java.util.UUID import java.util.UUID
import java.nio.file.Files import java.nio.file.Files
import java.io.FileOutputStream import java.io.FileOutputStream
import java.text.SimpleDateFormat
import java.text.DateFormat
class RootController : Controller() { class RootController : Controller() {
@ -194,13 +190,7 @@ class RootController : Controller() {
*/ */
fun showDetail(data: Texture) { fun showDetail(data: Texture) {
mvc.setPreview3DTexture(con.getTexturePreview(data.textureHash)) mvc.setPreview3DTexture(con.getTexturePreview(data.textureHash))
mvc.setMeta(data.name, data.resolution.toString(), "")
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.setTags(data.tags.toList().observable()) mvc.setTags(data.tags.toList().observable())
selectedTexture = data selectedTexture = data
} }

View File

@ -39,7 +39,7 @@ class DetailView: View() {
} }
} }
field { field("Meta") {
add(metaLabel) add(metaLabel)
} }

View File

@ -36,8 +36,8 @@ class MainViewController : Controller() {
preview.setTexture(img) preview.setTexture(img)
} }
fun setMeta(name: String, res: String, format: String, date: String) { fun setMeta(name: String, res: String, etc: String) {
metaLabel.text = "Name: $name\nAuflösung: $res\nFormat: $format\nEinfügedatum: $date" metaLabel.text = "Name: $name\nAuflösung: $res\nAnderes: $etc"
} }
fun setTags(chips: ObservableList<String>) { fun setTags(chips: ObservableList<String>) {