forked from j62/ctbrec
Remove unused StackPanel
Embed the token panel into the header of the TabPane and remove the previously used StackPane
This commit is contained in:
parent
c61a20de57
commit
139bd7b1c9
|
@ -111,12 +111,9 @@ public class CtbrecApplication extends Application {
|
||||||
tabPane.getTabs().add(settingsTab);
|
tabPane.getTabs().add(settingsTab);
|
||||||
tabPane.getTabs().add(new DonateTabFx());
|
tabPane.getTabs().add(new DonateTabFx());
|
||||||
|
|
||||||
StackPane stackPane = new StackPane();
|
|
||||||
stackPane.getChildren().add(tabPane);
|
|
||||||
|
|
||||||
int windowWidth = Config.getInstance().getSettings().windowWidth;
|
int windowWidth = Config.getInstance().getSettings().windowWidth;
|
||||||
int windowHeight = Config.getInstance().getSettings().windowHeight;
|
int windowHeight = Config.getInstance().getSettings().windowHeight;
|
||||||
primaryStage.setScene(new Scene(stackPane, windowWidth, windowHeight));
|
primaryStage.setScene(new Scene(tabPane, windowWidth, windowHeight));
|
||||||
followedTab.setScene(primaryStage.getScene());
|
followedTab.setScene(primaryStage.getScene());
|
||||||
primaryStage.getScene().getStylesheets().add("/ctbrec/ui/ThumbCell.css");
|
primaryStage.getScene().getStylesheets().add("/ctbrec/ui/ThumbCell.css");
|
||||||
primaryStage.getScene().widthProperty().addListener((observable, oldVal, newVal) -> Config.getInstance().getSettings().windowWidth = newVal.intValue());
|
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.setMaxHeight(tabPane.getTabMaxHeight());
|
||||||
tokenPanel.setMaxWidth(200);
|
tokenPanel.setMaxWidth(200);
|
||||||
tokenBalance.setFont(Font.font(fontSize));
|
tokenBalance.setFont(Font.font(fontSize));
|
||||||
HBox.setMargin(tokenBalance, new Insets(5, 5, 0, 0));
|
HBox.setMargin(tokenBalance, new Insets(0, 5, 0, 0));
|
||||||
StackPane.setAlignment(tokenPanel, Pos.TOP_RIGHT);
|
HBox.setMargin(buyTokens, new Insets(0, 5, 0, 0));
|
||||||
StackPane.setMargin(tokenPanel, new Insets(5));
|
|
||||||
for (Node node : tabPane.getChildrenUnmodifiable()) {
|
for (Node node : tabPane.getChildrenUnmodifiable()) {
|
||||||
if(node.getStyleClass().contains("tab-header-area")) {
|
if(node.getStyleClass().contains("tab-header-area")) {
|
||||||
Parent header = (Parent) node;
|
Parent header = (Parent) node;
|
||||||
|
|
Loading…
Reference in New Issue