Skip to content

Commit

Permalink
Make window resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliony committed Feb 20, 2024
1 parent b2789c3 commit 91661d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/main/java/cvb/gui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public void start(Stage stage) {
Font.loadFont(getClass().getResourceAsStream("/styles/SourceSans3-Regular.otf"), 16);
Font.loadFont(getClass().getResourceAsStream("/styles/PeaxHandwritingbold.ttf"), 16);
scene.getStylesheets().add(getClass().getResource("/styles/dark-theme.css").toExternalForm());
stage.setResizable(false);
stage.setScene(scene);
stage.show();
} catch (IOException e) {
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cvb.gui.MainWindow">
<AnchorPane fx:id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cvb.gui.MainWindow">
<children>
<TextField fx:id="userInput" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" AnchorPane.bottomAnchor="0.0" />
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="Send" />
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" vbarPolicy="ALWAYS">
<TextField fx:id="userInput" onAction="#handleUserInput" prefHeight="41.0" prefWidth="${pane.width-76.0}" AnchorPane.bottomAnchor="1.0" />
<Button fx:id="sendButton" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="Send" AnchorPane.rightAnchor="1.0" AnchorPane.bottomAnchor="1.0" />
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" vbarPolicy="ALWAYS" prefWidth="${pane.width}" vvalue="1.0" hvalue="1.0" >
<content>
<VBox fx:id="dialogContainer" prefHeight="558.0" prefWidth="384.0" />
<VBox fx:id="dialogContainer" prefHeight="${pane.height-41.0}" prefWidth="${pane.width-16.0}" />
</content>
</ScrollPane>
</children>
Expand Down

0 comments on commit 91661d6

Please sign in to comment.