From: Mathieu Baudier Date: Thu, 22 Jul 2021 05:35:19 +0000 (+0200) Subject: Make multipart terms display more compact. X-Git-Tag: argeo-suite-2.3.1~4 X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=commitdiff_plain;h=d2996b5b62561b2f10bdba786551076607e94d9c Make multipart terms display more compact. --- diff --git a/core/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java b/core/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java index 395e7ef..7628a3a 100644 --- a/core/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java +++ b/core/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java @@ -20,9 +20,7 @@ import org.argeo.jcr.Jcr; import org.eclipse.swt.SWT; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; -import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.layout.RowData; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -46,6 +44,7 @@ public class MultiTermsPart extends AbstractTermsPart { boolean vertical = SWT.VERTICAL == (getStyle() & SWT.VERTICAL); RowLayout rl = new RowLayout(vertical ? SWT.VERTICAL : SWT.HORIZONTAL); + rl = CmsUiUtils.noSpaceRowLayout(rl); // rl.wrap = true; // rl.justify = true; placeholder.setLayout(rl); @@ -54,7 +53,7 @@ public class MultiTermsPart extends AbstractTermsPart { for (Term value : currentValue) { Composite block = new Composite(placeholder, SWT.NONE); block.setLayout(CmsUiUtils.noSpaceGridLayout(3)); - Label lbl = new Label(block, SWT.SINGLE); + Label lbl = new Label(block, SWT.NONE); String display = getTermLabel(value); lbl.setText(display); CmsUiUtils.style(lbl, style == null ? FormStyle.propertyText.style() : style);