Skip to content

Commit

Permalink
Fix alignment of delete icon in ExperimentalVariableRowLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffengreiner committed Aug 29, 2024
1 parent f17fd77 commit 488089b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,11 @@ Since we want to remove the spacing between the cancel and confirm button we rep

.experiment-variable-dialog .content .row {
display: flex;
align-items: center;
gap: var(--lumo-space-l);
align-items: baseline;
column-gap: var(--lumo-space-l);
}


.add-project-dialog::part(content) {
display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package life.qbic.datamanager.views.projects.project.experiments.experiment.components;

import com.vaadin.flow.component.formlayout.FormLayout;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.component.icon.Icon;
import com.vaadin.flow.component.icon.VaadinIcon;
Expand Down Expand Up @@ -45,9 +44,6 @@ static ExperimentalVariableRowLayout from(

private void init() {
addClassName("row");
FormLayout experimentalVariableFieldsLayout = new FormLayout();
experimentalVariableFieldsLayout.add(nameField, unitField, levelArea);
experimentalVariableFieldsLayout.setResponsiveSteps(new FormLayout.ResponsiveStep("0", 3));
nameField.setRequired(true);
nameField.setPlaceholder("e.g. age");
unitField.setPlaceholder("e.g. years");
Expand All @@ -59,7 +55,8 @@ private void init() {
42
68
""");
add(experimentalVariableFieldsLayout, deleteIcon);
/*Span around Icon is necessary otherwise icon size will be scaled down if a scrollbar appears*/
add(nameField, unitField, levelArea, new Span(deleteIcon));
}

public String getVariableName() {
Expand Down

0 comments on commit 488089b

Please sign in to comment.