Skip to content

Commit 5eec2fc

Browse files
javier-godoypaodb
authored andcommitted
fix: make ErrorWindow stacktrace responsive
1 parent cb68a52 commit 5eec2fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/flowingcode/vaadin/addons/errorwindow/ErrorWindow.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ private VerticalLayout createMainLayout() {
129129
mainLayout.setSpacing(false);
130130
mainLayout.setPadding(false);
131131
mainLayout.setMargin(false);
132+
mainLayout.setSizeFull();
132133

133134
final Html title =
134135
new Html(
@@ -180,12 +181,15 @@ private Button createDetailsButtonLayout() {
180181
}
181182

182183
private VerticalLayout createExceptionTraceLayout() {
184+
Component stackTraceArea = createStackTraceArea();
183185
exceptionTraceLayout = new VerticalLayout();
184186
exceptionTraceLayout.setSpacing(false);
185187
exceptionTraceLayout.setMargin(false);
186188
exceptionTraceLayout.setPadding(false);
187-
exceptionTraceLayout.add(createStackTraceArea());
189+
exceptionTraceLayout.add(stackTraceArea);
190+
exceptionTraceLayout.setFlexGrow(1, stackTraceArea);
188191
exceptionTraceLayout.setVisible(false);
192+
exceptionTraceLayout.getElement().getStyle().set("flex-grow", "1");
189193
return exceptionTraceLayout;
190194
}
191195

0 commit comments

Comments
 (0)