diff --git a/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/pages/AboutPage.kt b/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/pages/AboutPage.kt
index 56789ed..ec5217d 100644
--- a/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/pages/AboutPage.kt
+++ b/img-ui/src/main/kotlin/dev/nuculabs/imagetagger/ui/pages/AboutPage.kt
@@ -1,15 +1,18 @@
package dev.nuculabs.imagetagger.ui.pages
+import javafx.application.Platform
import javafx.fxml.FXML
import javafx.fxml.FXMLLoader
import javafx.scene.Parent
import javafx.scene.Scene
+import javafx.scene.control.Button
import javafx.stage.Stage
import java.awt.Desktop
import java.net.URL
class AboutPage {
+ lateinit var closeButton: Button
@FXML
fun openBlog() {
@@ -21,6 +24,15 @@ class AboutPage {
Desktop.getDesktop().browse(URL("https://github.com/dnutiu/ImageTagger").toURI());
}
+ @FXML
+ fun closePage() {
+ Platform.runLater {
+ // Get a reference to the stage
+ val stage = closeButton.scene.window as Stage
+ stage.hide()
+ }
+ }
+
companion object {
fun show() {
val fxmlLoader = FXMLLoader(AboutPage::class.java.getResource("about-page.fxml"))
diff --git a/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml b/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml
index b619e5a..a694943 100644
--- a/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml
+++ b/img-ui/src/main/resources/dev/nuculabs/imagetagger/ui/pages/about-page.fxml
@@ -42,6 +42,12 @@
-
+
+
+