diff --git a/frontend/styles/view/main/help-dialog.css b/frontend/styles/view/main/help-dialog.css index 6ce0df2..eb3e71c 100644 --- a/frontend/styles/view/main/help-dialog.css +++ b/frontend/styles/view/main/help-dialog.css @@ -8,6 +8,7 @@ } #headingLayout { + min-height: 107px; width: 100%; display: flex; position: relative; diff --git a/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java b/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java index 0a6c8c3..e40eb55 100644 --- a/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java +++ b/src/main/java/edu/kit/typicalc/view/main/HelpDialog.java @@ -39,6 +39,7 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver { private final Select languageSelect; private final ItemLabelGenerator renderer; private final Paragraph typicalcInfo; + private final Button exampleButton; /** * Create a new HelpDialog. @@ -61,6 +62,7 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver { headingLayout.add(heading, languageSelect, closeIcon); + exampleButton = InputBar.createExampleButton(); VerticalLayout contentLayout = new VerticalLayout(); Accordion content = createHelpContent(); content.setId(ACCORDION_ID); @@ -83,7 +85,7 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver { acc.add(new HelpContentField("root.shortcuts", "root.helpShortcuts")); acc.add(new HelpContentField("root.drawer", "root.helpDrawer")); acc.add(new HelpContentField("", - InputBar.createExampleButton(), "root.helpExample")); + exampleButton, "root.helpExample")); acc.add(new HelpContentField("root.firstStepButton", new Button(new Icon(VaadinIcon.ANGLE_DOUBLE_LEFT)), "root.helpFirstStepButton")); acc.add(new HelpContentField("root.previousStepButton", @@ -99,6 +101,7 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver { @Override public void localeChange(LocaleChangeEvent event) { + exampleButton.setText(getTranslation("root.exampleButton")); heading.setText(getTranslation("root.operatingHelp")); languageSelect.setLabel(getTranslation("root.selectLanguage")); languageSelect.setTextRenderer(renderer); diff --git a/src/main/java/edu/kit/typicalc/view/main/InputBar.java b/src/main/java/edu/kit/typicalc/view/main/InputBar.java index 7309096..805675e 100644 --- a/src/main/java/edu/kit/typicalc/view/main/InputBar.java +++ b/src/main/java/edu/kit/typicalc/view/main/InputBar.java @@ -138,6 +138,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver { @Override public void localeChange(LocaleChangeEvent event) { inputField.setPlaceholder(getTranslation("root.inputFieldPlaceholder")); + exampleButton.setText(getTranslation("root.exampleButton")); inferTypeButton.setText(getTranslation("root.typeInfer")); typeAssumptions.setText(getTranslation("root.typeAssumptions")); infoIcon.getElement().setAttribute("title", getTranslation("root.inputSyntax"));