Skip to content

Commit 06c0c2e

Browse files
committed
change dialog box shange and background color
1 parent a5d0cc5 commit 06c0c2e

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

src/main/java/DialogBox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private DialogBox(String text, Image img) {
3333
} catch (IOException e) {
3434
e.printStackTrace();
3535
}
36-
Circle clip = new Circle(50, 50, 49);
36+
Circle clip = new Circle(30, 30, 30);
3737

3838
dialog.setText(text);
3939
displayPicture.setImage(img);
-4.71 KB
Loading
Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<?import javafx.geometry.Insets?>
4+
<?import javafx.scene.Group?>
45
<?import javafx.scene.control.Label?>
56
<?import javafx.scene.image.ImageView?>
67
<?import javafx.scene.layout.HBox?>
78

8-
<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" spacing="10.0" style="-fx-border-radius: 5; -fx-background-color: #C2E0FB;" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
9+
<fx:root alignment="TOP_RIGHT" maxWidth="-Infinity" opacity="0.81" prefWidth="430.0" style="-fx-border-radius: 30 30 0 0; -fx-background-color: #5598AA; -fx-background-radius: 30 30 30 30; -fx-background-position: center;" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
910
<children>
10-
<Label fx:id="dialog" text="Label" wrapText="true">
11+
<Group>
12+
<children>
13+
<Label fx:id="dialog" text="Label" textFill="#f2f0f0" wrapText="true" />
14+
</children>
1115
<HBox.margin>
12-
<Insets right="10.0" top="40.0" />
13-
</HBox.margin></Label>
14-
<ImageView fx:id="displayPicture" fitHeight="99.0" fitWidth="99.0" pickOnBounds="true" preserveRatio="true" />
16+
<Insets bottom="15.0" right="10.0" top="15.0" />
17+
</HBox.margin>
18+
</Group>
19+
<ImageView fx:id="displayPicture" fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
20+
<HBox.margin>
21+
<Insets />
22+
</HBox.margin>
23+
</ImageView>
1524
</children>
1625
<padding>
17-
<Insets bottom="15.0" left="5.0" right="5.0" top="15.0" />
26+
<Insets bottom="10.0" left="5.0" right="5.0" top="10.0" />
1827
</padding>
1928
</fx:root>
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3+
<?import javafx.geometry.Insets?>
34
<?import javafx.scene.control.Button?>
45
<?import javafx.scene.control.ScrollPane?>
56
<?import javafx.scene.control.TextField?>
67
<?import javafx.scene.layout.AnchorPane?>
78
<?import javafx.scene.layout.VBox?>
89

9-
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="MainWindow">
10+
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="450.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="MainWindow">
1011
<children>
1112
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="316.0" promptText="Type your input here..." AnchorPane.leftAnchor="4.0" AnchorPane.rightAnchor="80.0" />
1213
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="72.0" text="Send" AnchorPane.rightAnchor="4.0" />
13-
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="400.0" vvalue="1.0">
14+
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="450.0" vvalue="1.0">
1415
<content>
15-
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="388.0" spacing="20.0" />
16+
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="440.0" spacing="25.0">
17+
<padding>
18+
<Insets left="10.0" right="10.0" />
19+
</padding></VBox>
1620
</content>
21+
<padding>
22+
<Insets left="5.0" right="5.0" />
23+
</padding>
1724
</ScrollPane>
1825
</children>
1926
</AnchorPane>

0 commit comments

Comments
 (0)