diff --git a/frontend/styles/view/main/type-assumptions-area.css b/frontend/styles/view/main/type-assumptions-area.css index 0eddf9b..f78e02b 100644 --- a/frontend/styles/view/main/type-assumptions-area.css +++ b/frontend/styles/view/main/type-assumptions-area.css @@ -2,6 +2,7 @@ display: flex; justify-content: center; align-items: center; + padding: 0; } #assButtons { diff --git a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java index 3fe5e39..7f8fca3 100644 --- a/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java +++ b/src/main/java/edu/kit/typicalc/view/main/TypeAssumptionsArea.java @@ -40,6 +40,7 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver private final VerticalLayout assumptionContainer; private final Button addAssumption; private final Button deleteAll; + private final Button saveAssumptions; private final List fields = new ArrayList<>(); @@ -62,7 +63,9 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver deleteAll.addClickListener(event -> onDeleteAllClick()); deleteAll.setIconAfterText(true); deleteAll.addThemeVariants(ButtonVariant.LUMO_ERROR); - buttons.add(addAssumption, deleteAll); + saveAssumptions = new Button(getTranslation("root.save"), event -> this.close()); + saveAssumptions.addThemeVariants(ButtonVariant.LUMO_SUCCESS); + buttons.add(addAssumption, deleteAll, saveAssumptions); assumptionContainer = new VerticalLayout(); assumptionContainer.setId(ASS_CONTAINER_ID); @@ -77,8 +80,8 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver } layout.add(heading, buttons, assumptionContainer); - layout.setPadding(false); add(layout); + setCloseOnOutsideClick(false); } /** @@ -123,5 +126,6 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver heading.setText(getTranslation("root.typeAssumptions")); addAssumption.setText(getTranslation("root.addAssumption")); deleteAll.setText(getTranslation("root.deleteAll")); + saveAssumptions.setText(getTranslation("root.save")); } } diff --git a/src/main/resources/language/translation_de.properties b/src/main/resources/language/translation_de.properties index 99f4534..561c8ed 100644 --- a/src/main/resources/language/translation_de.properties +++ b/src/main/resources/language/translation_de.properties @@ -1,4 +1,5 @@ root.close=Schließen +root.save=Speichern root.copyLatex=Kopiere Latex-Code root.selectExample=Beispiel auswählen: root.typeInfer=Typisieren diff --git a/src/main/resources/language/translation_en.properties b/src/main/resources/language/translation_en.properties index 11b64af..dd95f1d 100644 --- a/src/main/resources/language/translation_en.properties +++ b/src/main/resources/language/translation_en.properties @@ -1,4 +1,5 @@ root.close=Close +root.save=Save root.copyLatex=Copy latex code root.selectExample=Select example: root.typeInfer=Type