From 8519ccf8f1dca42eaf63927d218cdf672a64d276 Mon Sep 17 00:00:00 2001 From: macareonie Date: Sat, 17 Feb 2024 23:11:02 +0800 Subject: [PATCH] Improve GUI Current GUI has inconsistent padding between images, text and borders. The GUI also consists a solid colour background. Let's, * Add colour changes for Tsundere dialogbox and User dialogbox. * Implement appropriate padding changes. --- src/main/java/tsundere/gui/DialogBox.java | 1 + src/main/resources/view/DialogBox.fxml | 22 ++++++++++++++++++---- src/main/resources/view/MainWindow.fxml | 10 +++++----- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/main/java/tsundere/gui/DialogBox.java b/src/main/java/tsundere/gui/DialogBox.java index f89af718f0..f69b81bb1d 100644 --- a/src/main/java/tsundere/gui/DialogBox.java +++ b/src/main/java/tsundere/gui/DialogBox.java @@ -62,6 +62,7 @@ public static DialogBox getUserDialog(String text, Image img) { public static DialogBox getTsundereDialog(String text, Image img) { var db = new DialogBox(text, img); db.flip(); + db.dialog.setStyle("-fx-background-color: #f2cc50; -fx-background-radius: 15; -fx-label-padding: 1;"); return db; } } diff --git a/src/main/resources/view/DialogBox.fxml b/src/main/resources/view/DialogBox.fxml index a12f5115ae..860cad20b9 100644 --- a/src/main/resources/view/DialogBox.fxml +++ b/src/main/resources/view/DialogBox.fxml @@ -5,19 +5,33 @@ + - - + + - diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index d5595e82c6..a786a5d33a 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -6,13 +6,13 @@ - + - -