From 139bd7b1c9e5e220094fa20c261d4093217d16f8 Mon Sep 17 00:00:00 2001 From: 0xboobface <0xboobface@gmail.com> Date: Sun, 7 Oct 2018 18:12:11 +0200 Subject: [PATCH] Remove unused StackPanel Embed the token panel into the header of the TabPane and remove the previously used StackPane --- src/main/java/ctbrec/ui/CtbrecApplication.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/ctbrec/ui/CtbrecApplication.java b/src/main/java/ctbrec/ui/CtbrecApplication.java index fae50a5a..45a0db26 100644 --- a/src/main/java/ctbrec/ui/CtbrecApplication.java +++ b/src/main/java/ctbrec/ui/CtbrecApplication.java @@ -111,12 +111,9 @@ public class CtbrecApplication extends Application { tabPane.getTabs().add(settingsTab); tabPane.getTabs().add(new DonateTabFx()); - StackPane stackPane = new StackPane(); - stackPane.getChildren().add(tabPane); - int windowWidth = Config.getInstance().getSettings().windowWidth; int windowHeight = Config.getInstance().getSettings().windowHeight; - primaryStage.setScene(new Scene(stackPane, windowWidth, windowHeight)); + primaryStage.setScene(new Scene(tabPane, windowWidth, windowHeight)); followedTab.setScene(primaryStage.getScene()); primaryStage.getScene().getStylesheets().add("/ctbrec/ui/ThumbCell.css"); primaryStage.getScene().widthProperty().addListener((observable, oldVal, newVal) -> Config.getInstance().getSettings().windowWidth = newVal.intValue()); @@ -174,9 +171,8 @@ public class CtbrecApplication extends Application { tokenPanel.setMaxHeight(tabPane.getTabMaxHeight()); tokenPanel.setMaxWidth(200); tokenBalance.setFont(Font.font(fontSize)); - HBox.setMargin(tokenBalance, new Insets(5, 5, 0, 0)); - StackPane.setAlignment(tokenPanel, Pos.TOP_RIGHT); - StackPane.setMargin(tokenPanel, new Insets(5)); + HBox.setMargin(tokenBalance, new Insets(0, 5, 0, 0)); + HBox.setMargin(buyTokens, new Insets(0, 5, 0, 0)); for (Node node : tabPane.getChildrenUnmodifiable()) { if(node.getStyleClass().contains("tab-header-area")) { Parent header = (Parent) node;