Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix learn view issues with resizing and texts and buttons out of alignment #1234

Merged
merged 7 commits into from
Oct 2, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public static void fillColumn(GridPane gridPane,
String headline,
String headlineStyleClass,
String headlineImageId,
double headlineImageIdGap,
Insets headlineMargin,
String info,
String infoLabelStyleClass,
Expand All @@ -137,7 +138,10 @@ public static void fillColumn(GridPane gridPane,

gridPane.add(group, columnIndex, rowCount, 1, gridPaneRows);

Label headlineLabel = getHeadline(headline, headlineStyleClass, headlineImageId, 16.0);
Label headlineLabel = getHeadline(headline,
headlineStyleClass,
headlineImageId,
headlineImageIdGap);
GridPane.setMargin(headlineLabel, headlineMargin);
gridPane.add(headlineLabel, columnIndex, rowCount);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public OverviewAcademyView(OverviewAcademyModel model, OverviewAcademyController
super(new GridPane(), model, controller);

root.setPadding(new Insets(0, 0, 0, 0));
root.setHgap(PADDING);
root.setHgap(20);
root.setVgap(PADDING);
root.setCursor(Cursor.HAND);

Expand Down Expand Up @@ -79,6 +79,7 @@ private void addHeaderBox() {
VBox.setVgrow(headlineLabel, Priority.ALWAYS);
VBox.setVgrow(contentLabel, Priority.ALWAYS);
VBox vBox = new VBox(20, headlineLabel, contentLabel);
GridPane.setMargin(vBox, new Insets(20, 0, 0, 0));
GridPane.setHgrow(vBox, Priority.ALWAYS);
root.add(vBox, 0, rowIndex, 2, 1);
}
Expand All @@ -95,9 +96,9 @@ private void addSmallBox(String leftIconId,
GridPaneUtil.setGridPaneTwoColumnsConstraints(gridPane);

Insets groupInsets = new Insets(20, 20, 20, 20);
Insets headlineInsets = new Insets(20, 20, 0, 20);
Insets infoInsets = new Insets(20, 20, 0, 20);
Insets buttonInsets = new Insets(20, 20, 20, 20);
Insets headlineInsets = new Insets(22, 20, 0, 20);
Insets infoInsets = new Insets(23, 20, 0, 20);
Insets buttonInsets = new Insets(30, 20, 30, 20);

Button leftBoxButton = new Button(Res.get("academy.overview.selectButton"));
leftBoxButton.getStyleClass().addAll("medium-large-button",
Expand All @@ -112,6 +113,7 @@ private void addSmallBox(String leftIconId,
Res.get("academy.overview." + leftTopic),
"bisq-text-headline-2",
leftIconId,
5d,
aspire2dev marked this conversation as resolved.
Show resolved Hide resolved
headlineInsets,
Res.get("academy.overview." + leftTopic + ".content"),
"bisq-text-3",
Expand All @@ -132,6 +134,7 @@ private void addSmallBox(String leftIconId,
Res.get("academy.overview." + rightTopic),
"bisq-text-headline-2",
rightIconId,
5d,
headlineInsets,
Res.get("academy.overview." + rightTopic + ".content"),
"bisq-text-3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public BisqEasyOnboardingView(BisqEasyOnboardingModel model, BisqEasyOnboardingC
Res.get("bisqEasy.onboarding.left.headline"),
headlineLabelStyleClass,
"bisq-easy",
16d,
headlineInsets,
Res.get("bisqEasy.onboarding.left.info"),
infoLabelStyleClass,
Expand All @@ -97,6 +98,7 @@ public BisqEasyOnboardingView(BisqEasyOnboardingModel model, BisqEasyOnboardingC
Res.get("bisqEasy.onboarding.right.headline"),
headlineLabelStyleClass,
"fiat-btc",
16d,
headlineInsets,
Res.get("bisqEasy.onboarding.right.info"),
infoLabelStyleClass,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public DashboardView(DashboardModel model, DashboardController controller) {
Res.get("dashboard.second.headline"),
headlineLabelStyleClass,
"fiat-btc",
16d,
headlineInsets,
Res.get("dashboard.second.content"),
infoLabelStyleClass,
Expand All @@ -110,6 +111,7 @@ public DashboardView(DashboardModel model, DashboardController controller) {
Res.get("dashboard.third.headline"),
headlineLabelStyleClass,
"learn",
16d,
headlineInsets,
Res.get("dashboard.third.content"),
infoLabelStyleClass,
Expand Down