Skip to content

Commit

Permalink
Improve layout to avoid scrollbars
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikJannsen committed Sep 29, 2024
1 parent 68a6ceb commit 6930726
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected void onViewAttached() {
closeButton.setOnAction(e -> controller.onClose());

root.setPrefWidth(OverlayModel.WIDTH);
root.setPrefHeight(OverlayModel.HEIGHT + 220);
root.setPrefHeight(OverlayModel.HEIGHT + 140);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public AccountAgeTab1View(AccountAgeTab1Model model,
HBox buttons = new HBox(20, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(headline2, new Insets(20, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(headline2, new Insets(15, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -15, 0));

VBox contentBox = new VBox(20);
VBox contentBox = new VBox(15);
contentBox.getChildren().addAll(headline, info, headline2, info2, buttons);
contentBox.getStyleClass().addAll("bisq-common-bg", "common-line-spacing");
root.getChildren().addAll(contentBox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public AccountAgeTab2View(AccountAgeTab2Model model, AccountAgeTab2Controller co
HBox buttons = new HBox(20, backButton, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -10, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, hBox, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public AccountAgeTab3View(AccountAgeTab3Model model,
HBox buttons = new HBox(20, backButton, closeButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(stepOne, new Insets(-20,0,0,0));
VBox.setMargin(buttons, new Insets(0,0,-15,0));
VBox contentBox = new VBox(30);
contentBox.getChildren().addAll(stepOne, stepTwo, stepThree, stepFour, requestCertificateButton, buttons);
contentBox.getStyleClass().addAll("bisq-common-bg", "common-line-spacing");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected void onViewAttached() {
closeButton.setOnAction(e -> controller.onClose());

root.setPrefWidth(OverlayModel.WIDTH);
root.setPrefHeight(OverlayModel.HEIGHT + 110);
root.setPrefHeight(OverlayModel.HEIGHT + 140);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public BondedReputationTab1View(BondedReputationTab1Model model,
HBox buttons = new HBox(20, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(headline2, new Insets(20, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -10, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, headline2, info2, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public BondedReputationTab2View(BondedReputationTab2Model model, BondedReputatio
HBox buttons = new HBox(20, backButton, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -10, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, hBox, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public BondedReputationTab3View(BondedReputationTab3Model model,
Label headline = new Label(Res.get("reputation.bond.howToHeadline"));
headline.getStyleClass().add("bisq-text-headline-2");

OrderedList info = new OrderedList(Res.get("reputation.bond.howTo"), "bisq-text-13", 7, 7);
OrderedList info = new OrderedList(Res.get("reputation.bond.howTo"), "bisq-text-13", 7, 5);

Label userProfileSelectLabel = new Label(Res.get("user.bondedRoles.userProfile.select").toUpperCase());
userProfileSelectLabel.getStyleClass().add("bisq-text-4");
Expand All @@ -65,11 +65,11 @@ public BondedReputationTab3View(BondedReputationTab3Model model,
HBox buttons = new HBox(20, backButton, closeButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setVgrow(info, Priority.ALWAYS);
VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(userProfileSelectLabel, new Insets(10, 0, -20, 0));
VBox.setMargin(userProfileSelection, new Insets(0, 0, -30, 0));
VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -10, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, userProfileSelectLabel, userProfileSelection, pubKeyHash, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected void onViewAttached() {
closeButton.setOnAction(e -> controller.onClose());

root.setPrefWidth(OverlayModel.WIDTH);
root.setPrefHeight(OverlayModel.HEIGHT + 110);
root.setPrefHeight(OverlayModel.HEIGHT + 140);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public BurnBsqTab1View(BurnBsqTab1Model model,
HBox buttons = new HBox(20, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(headline2, new Insets(20, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -10, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, headline2, info2, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public BurnBsqTab2View(BurnBsqTab2Model model, BurnBsqTab2Controller controller,
HBox buttons = new HBox(20, backButton, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -10, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, hBox, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public BurnBsqTab3View(BurnBsqTab3Model model,
Label headline = new Label(Res.get("reputation.burnedBsq.howToHeadline"));
headline.getStyleClass().add("bisq-text-headline-2");

OrderedList info = new OrderedList(Res.get("reputation.burnedBsq.howTo"), "bisq-text-13", 7, 7);
OrderedList info = new OrderedList(Res.get("reputation.burnedBsq.howTo"), "bisq-text-13", 7, 5);

Label userProfileSelectLabel = new Label(Res.get("user.bondedRoles.userProfile.select").toUpperCase());
userProfileSelectLabel.getStyleClass().add("bisq-text-4");
Expand All @@ -67,11 +67,11 @@ public BurnBsqTab3View(BurnBsqTab3Model model,
HBox buttons = new HBox(20, backButton, closeButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setVgrow(info, Priority.ALWAYS);
VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(userProfileSelectLabel, new Insets(10, 0, -20, 0));
VBox.setMargin(userProfileSelection, new Insets(0, 0, -30, 0));
VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -15, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, userProfileSelectLabel, userProfileSelection, pubKeyHash, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected void onViewAttached() {
closeButton.setOnAction(e -> controller.onClose());

root.setPrefWidth(OverlayModel.WIDTH);
root.setPrefHeight(OverlayModel.HEIGHT + 220);
root.setPrefHeight(OverlayModel.HEIGHT + 140);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public SignedWitnessTab1View(SignedWitnessTab1Model model,
HBox buttons = new HBox(20, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(headline2, new Insets(20, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(headline2, new Insets(15, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -15, 0));

VBox contentBox = new VBox(20);
VBox contentBox = new VBox(15);
contentBox.getChildren().addAll(headline, info, headline2, info2, buttons);
contentBox.getStyleClass().addAll("bisq-common-bg", "common-line-spacing");
root.getChildren().addAll(contentBox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public SignedWitnessTab2View(SignedWitnessTab2Model model, SignedWitnessTab2Cont
HBox buttons = new HBox(20, backButton, nextButton, Spacer.fillHBox(), learnMore);
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox.setMargin(buttons, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(10, 0, 0, 0));
VBox.setMargin(headline, new Insets(-25, 0, 0, 0));
VBox.setMargin(buttons, new Insets(10, 0, -10, 0));

VBox contentBox = new VBox(20);
contentBox.getChildren().addAll(headline, info, hBox, buttons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public SignedWitnessTab3View(SignedWitnessTab3Model model,
buttons.setAlignment(Pos.BOTTOM_RIGHT);

VBox contentBox = new VBox(30);
VBox.setMargin(stepOne, new Insets(-20, 0, 0, 0));
VBox.setMargin(buttons, new Insets(0, 0, -15, 0));
contentBox.getChildren().addAll(stepOne, stepTwo, stepThree, stepFour, requestCertificateButton, buttons);
contentBox.getStyleClass().addAll("bisq-common-bg", "common-line-spacing");
root.getChildren().addAll(contentBox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
}

.reputation .label {
-fx-line-spacing: 7px;
-fx-line-spacing: 0px;
-fx-wrap-text: true;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/desktop/src/main/resources/css/containers.css
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
}

.common-line-spacing .label {
-fx-line-spacing: 7px;
-fx-line-spacing: 0px;
}

#chat-message-quote-box-peer-msg {
Expand Down

0 comments on commit 6930726

Please sign in to comment.