提交 b3235ec5 编写于 作者: S Serge Rider

#12471 Boolean editor for left-aligned containers

上级 6a0c2fca
......@@ -55,7 +55,16 @@ public class CustomCheckboxCellEditor extends CellEditor {
ph.setBackground(parent.getBackground());
checkBox = new Label(ph, SWT.NONE);
GridData gd = new GridData(SWT.CENTER, SWT.FILL, true, true);
GridData gd;
if ((getStyle() & SWT.LEFT) == SWT.LEFT) {
gd = new GridData(SWT.LEFT, SWT.FILL, true, true);
if (BooleanRenderer.getDefaultStyle().isText()) {
gd.horizontalIndent = 5;
}
} else {
gd = new GridData(SWT.CENTER, SWT.FILL, true, true);
}
checkBox.setLayoutData(gd);
checkBox.setBackground(ph.getBackground());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册