|
19 | 19 | */ |
20 | 20 | package com.flowingcode.addons.applayout; |
21 | 21 |
|
| 22 | +import java.io.BufferedReader; |
| 23 | +import java.io.InputStream; |
| 24 | +import java.io.InputStreamReader; |
| 25 | +import java.util.stream.Collectors; |
22 | 26 | import com.flowingcode.addons.applayout.MouseClickEvent.MouseButton; |
23 | 27 | import com.flowingcode.addons.applayout.menu.PaperCard; |
24 | 28 | import com.flowingcode.addons.applayout.menu.PaperToggle; |
|
30 | 34 | import com.vaadin.flow.component.dialog.Dialog; |
31 | 35 | import com.vaadin.flow.component.html.Div; |
32 | 36 | import com.vaadin.flow.component.html.H3; |
33 | | -import com.vaadin.flow.component.html.H4; |
34 | 37 | import com.vaadin.flow.component.html.H5; |
35 | 38 | import com.vaadin.flow.component.html.Image; |
36 | 39 | import com.vaadin.flow.component.html.Span; |
|
40 | 43 | import com.vaadin.flow.component.orderedlayout.VerticalLayout; |
41 | 44 | import com.vaadin.flow.data.binder.Binder; |
42 | 45 | import com.vaadin.flow.router.Route; |
43 | | -import java.io.BufferedReader; |
44 | | -import java.io.InputStream; |
45 | | -import java.io.InputStreamReader; |
46 | | -import java.util.stream.Collectors; |
47 | 46 |
|
48 | 47 | @SuppressWarnings("serial") |
49 | 48 | @Route(value = "applayout", layout = DemoLayout.class) |
@@ -185,8 +184,12 @@ private Component createAvatarComponent() { |
185 | 184 | Image img = new Image("/frontend/images/avatar.png", "avatar"); |
186 | 185 | img.getStyle().set("width", "80px"); |
187 | 186 | img.getStyle().set("margin-top", "20px"); |
188 | | - H4 h4 = new H4("User"); |
189 | | - container.add(img, h4); |
| 187 | + Span userTitle = new Span("User"); |
| 188 | + userTitle.setWidthFull(); |
| 189 | + userTitle.getStyle().set("display", "block"); |
| 190 | + userTitle.getStyle().set("font-size", "large"); |
| 191 | + userTitle.getStyle().set("font-weight", "bold"); |
| 192 | + container.add(img, userTitle); |
190 | 193 | return container; |
191 | 194 | } |
192 | 195 |
|
|
0 commit comments