diff --git a/README.md b/README.md
index 69eae11..7f8524c 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
-# Decompiler
+# Decompiler
Java Decompiler Gui
diff --git a/build.gradle.kts b/build.gradle.kts
index bb10f97..ebcec08 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
}
group = "net.pryoscode"
-version = "0.1.3"
+version = "0.1.4"
kotlin {
jvmToolchain {
diff --git a/src/main/kotlin/net/pryoscode/decompiler/window/Window.kt b/src/main/kotlin/net/pryoscode/decompiler/window/Window.kt
index 34e600d..f2d3adc 100644
--- a/src/main/kotlin/net/pryoscode/decompiler/window/Window.kt
+++ b/src/main/kotlin/net/pryoscode/decompiler/window/Window.kt
@@ -1,13 +1,16 @@
package net.pryoscode.decompiler.window
+import com.sun.javafx.tk.Toolkit
import javafx.scene.Scene
import javafx.scene.image.Image
import javafx.scene.input.TransferMode
import javafx.scene.layout.BorderPane
+import javafx.scene.text.Font
import javafx.stage.Stage
import net.pryoscode.decompiler.window.code.Container
import net.pryoscode.decompiler.window.sidebar.Sidebar
import java.io.File
+import java.util.Base64
class Window(args: Array) : Stage() {
@@ -29,9 +32,20 @@ class Window(args: Array) : Stage() {
sidebar.open(it.dragboard.files[0])
}
+ Font.loadFont(javaClass.classLoader.getResourceAsStream("fonts/FiraSans-Regular.ttf"), Toolkit.getToolkit().fontLoader.systemFontSize.toDouble())
+ Font.loadFont(javaClass.classLoader.getResourceAsStream("fonts/FiraMono-Regular.ttf"), Toolkit.getToolkit().fontLoader.systemFontSize.toDouble())
+ root.stylesheets.add("data:text/css;base64," + Base64.getEncoder().encodeToString((
+ "* {" +
+ "-fx-font-family: 'Fira Sans';" +
+ "}" +
+ ".code-area * {" +
+ "-fx-font-family: 'Fira Mono';" +
+ "}"
+ ).toByteArray()))
+
title = "Decompiler v" + javaClass.`package`.specificationVersion
scene = Scene(root, 896.0, 560.0)
- icons.add(Image(javaClass.classLoader.getResourceAsStream("logo.png")))
+ icons.add(Image(javaClass.classLoader.getResourceAsStream("icons/logo.png")))
show()
if (args.isNotEmpty())
diff --git a/src/main/kotlin/net/pryoscode/decompiler/window/sidebar/Type.kt b/src/main/kotlin/net/pryoscode/decompiler/window/sidebar/Type.kt
index cb5f261..dc80b4b 100644
--- a/src/main/kotlin/net/pryoscode/decompiler/window/sidebar/Type.kt
+++ b/src/main/kotlin/net/pryoscode/decompiler/window/sidebar/Type.kt
@@ -9,6 +9,6 @@ enum class Type(icon: String) {
CLASS("class.png"),
FILE("file.png");
- val icon = Image(javaClass.classLoader.getResourceAsStream(icon))
+ val icon = Image(javaClass.classLoader.getResourceAsStream("icons/$icon"))
}
\ No newline at end of file
diff --git a/src/main/resources/fonts/FiraMono-Regular.ttf b/src/main/resources/fonts/FiraMono-Regular.ttf
new file mode 100644
index 0000000..59e1e1a
Binary files /dev/null and b/src/main/resources/fonts/FiraMono-Regular.ttf differ
diff --git a/src/main/resources/fonts/FiraSans-Regular.ttf b/src/main/resources/fonts/FiraSans-Regular.ttf
new file mode 100644
index 0000000..d9fdc0e
Binary files /dev/null and b/src/main/resources/fonts/FiraSans-Regular.ttf differ
diff --git a/src/main/resources/archive.png b/src/main/resources/icons/archive.png
similarity index 100%
rename from src/main/resources/archive.png
rename to src/main/resources/icons/archive.png
diff --git a/src/main/resources/class.png b/src/main/resources/icons/class.png
similarity index 100%
rename from src/main/resources/class.png
rename to src/main/resources/icons/class.png
diff --git a/src/main/resources/file.png b/src/main/resources/icons/file.png
similarity index 100%
rename from src/main/resources/file.png
rename to src/main/resources/icons/file.png
diff --git a/src/main/resources/logo.png b/src/main/resources/icons/logo.png
similarity index 100%
rename from src/main/resources/logo.png
rename to src/main/resources/icons/logo.png
diff --git a/src/main/resources/package.png b/src/main/resources/icons/package.png
similarity index 100%
rename from src/main/resources/package.png
rename to src/main/resources/icons/package.png
diff --git a/src/main/resources/screenshot.png b/src/main/resources/screenshot.png
index 84eaf12..2ba20aa 100644
Binary files a/src/main/resources/screenshot.png and b/src/main/resources/screenshot.png differ