mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-09 19:00:48 +00:00
Workaround for Vaadin weirdness
This commit is contained in:
parent
b2209bcdaf
commit
ed21276f46
4
frontend/styles/view/main/help-dialog-vaadin.css
Normal file
4
frontend/styles/view/main/help-dialog-vaadin.css
Normal file
@ -0,0 +1,4 @@
|
||||
[part="overlay"]{
|
||||
width: 1000px;
|
||||
height: 600px;
|
||||
}
|
@ -16,10 +16,6 @@
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#accordion {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.help-field {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user