Skip to content

Commit

Permalink
Remove magic number in Main.java
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliony committed Feb 23, 2024
1 parent 21fbb17 commit 2f29c74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/cvb/gui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
public class Main extends Application {

private static final int FONT_SIZE = 16;

@Override
public void start(Stage stage) {
stage.setTitle("ConvoBot");
Expand All @@ -24,8 +26,8 @@ public void start(Stage stage) {
FXMLLoader fxmlLoader = new FXMLLoader(Main.class.getResource("/view/MainWindow.fxml"));
AnchorPane ap = fxmlLoader.load();
Scene scene = new Scene(ap);
Font.loadFont(getClass().getResourceAsStream("/styles/SourceSans3-Regular.otf"), 16);
Font.loadFont(getClass().getResourceAsStream("/styles/PeaxHandwritingbold.ttf"), 16);
Font.loadFont(getClass().getResourceAsStream("/styles/SourceSans3-Regular.otf"), FONT_SIZE);
Font.loadFont(getClass().getResourceAsStream("/styles/PeaxHandwritingbold.ttf"), FONT_SIZE);
scene.getStylesheets().add(getClass().getResource("/styles/dark-theme.css").toExternalForm());
stage.setScene(scene);
stage.show();
Expand Down

0 comments on commit 2f29c74

Please sign in to comment.