Skip to content

Commit 51a98d1

Browse files
committed
🔛 Fix progress bar tooltip position
1 parent c0257c0 commit 51a98d1

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

frontend/styles/shared-styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/* Tooltip text */
3030
.tooltip .tooltiptext {
3131
visibility: hidden;
32-
width: 200px;
32+
width: 110px;
3333
display: block;
3434

3535
background-color: black;
@@ -42,15 +42,15 @@
4242
z-index: 1;
4343

4444
top: 50px;
45-
left: -100px;
45+
left: -85px;
4646
}
4747

4848
/* Tooltip Marker */
4949
.tooltip-bottom::after {
5050
content: "";
5151
position: absolute;
5252
bottom: 100%;
53-
left: 50%;
53+
left: 85px;
5454

5555
border-width: 5px;
5656
border-style: solid;

src/main/java/org/cleancode/journal/component/progressbar/GradeProgressBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public ProgressDay(String tooltip) {
2727
}
2828

2929
private void addToolTip(String tooltip) {
30-
addClassName("tooltip");
30+
addClassName("tooltip");
3131
Span span = new Span(tooltip);
3232
span.addClassName("tooltiptext");
3333
span.addClassName("tooltip-bottom");

src/main/java/org/cleancode/journal/view/AboutView.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import com.vaadin.flow.component.Composite;
44
import com.vaadin.flow.component.Html;
5+
import com.vaadin.flow.component.button.Button;
6+
import com.vaadin.flow.component.orderedlayout.FlexComponent;
7+
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
58
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
69
import com.vaadin.flow.router.PageTitle;
710
import com.vaadin.flow.router.Route;
@@ -15,7 +18,16 @@
1518
public class AboutView extends Composite<VerticalLayout> {
1619

1720
public AboutView(Profile profile, IGradeService gradeService, IAchievementService achievementService) {
21+
1822
var content = getContent();
23+
24+
HorizontalLayout line = new HorizontalLayout();
25+
line.setJustifyContentMode(FlexComponent.JustifyContentMode.BETWEEN);
26+
line.add(new Button("A"));
27+
line.add(new Button("B"));
28+
line.setSizeFull();
29+
content.add(line);
30+
1931
content.add(new Html(getTranslation("about.info")));
2032
content.add(new Html(getTranslation("about.info.technical")));
2133
content.add(new Html(getTranslation("about.info.tanks")));

0 commit comments

Comments
 (0)