Workaround for Vaadin weirdness

This commit is contained in:
Arne Keller 2021-02-14 13:13:09 +01:00
parent b2209bcdaf
commit ed21276f46
3 changed files with 5 additions and 11 deletions

View File

@ -0,0 +1,4 @@
[part="overlay"]{
width: 1000px;
height: 600px;
}

View File

@ -16,10 +16,6 @@
right: 0;
}
#accordion {
width: 100%;
}
.help-field {
justify-content: center;
align-items: center;

View File

@ -21,6 +21,7 @@ import java.util.Locale;
/**
* Contains information on how to use the application.
*/
@CssImport(value = "./styles/view/main/help-dialog-vaadin.css", themeFor = "vaadin-dialog-overlay")
@CssImport("./styles/view/main/help-dialog.css")
public class HelpDialog extends Dialog implements LocaleChangeObserver {
private static final long serialVersionUID = 4470277770276296164L;
@ -31,7 +32,6 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver {
private static final String HEADING_LAYOUT_ID = "headingLayout";
private static final String CONTENT_LAYOUT_ID = "contentLayout";
private static final String LANGUAGE_SELECT_ID = "languageSelect";
private static final String ACCORDION_ID = "accordion";
private final H3 heading;
private final Select<Locale> languageSelect;
@ -54,13 +54,9 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver {
VerticalLayout contentLayout = new VerticalLayout();
Accordion content = createHelpContent();
content.setId(ACCORDION_ID);
contentLayout.add(content);
contentLayout.setId(CONTENT_LAYOUT_ID);
add(headingLayout, contentLayout);
// setting size of overlay does not work if all accordion panels are closed
setWidth("1000px");
setHeight("600px");
}
private Accordion createHelpContent() {
@ -88,7 +84,5 @@ public class HelpDialog extends Dialog implements LocaleChangeObserver {
heading.setText(getTranslation("root.operatingHelp"));
languageSelect.setLabel(getTranslation("root.selectLanguage"));
languageSelect.setTextRenderer(renderer);
// TODO update help texts
// language-switch already works
}
}