mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 23:55:26 +02:00
Bug 163815 - Fixed NPE caused by lack of GridData for non-drawn inherit button controls. Added GridData for the control - some hints may be ignored on non-drawn platforms.
This commit is contained in:
parent
5288aae7de
commit
e0b55f83c4
1 changed files with 4 additions and 6 deletions
|
@ -76,12 +76,10 @@ public class InheritButton extends Composite {
|
|||
public InheritButton(Composite parent) {
|
||||
super(parent, SWT.NONE);
|
||||
isDrawn = System.getProperty("os.name").toLowerCase().startsWith("win");
|
||||
if (isDrawn) {
|
||||
GridData data = new GridData(SWT.CENTER, SWT.CENTER, false, false);
|
||||
data.widthHint = DEFAULT_WIDTH;
|
||||
data.heightHint = DEFAULT_HEIGHT;
|
||||
setLayoutData(data);
|
||||
}
|
||||
GridData data = new GridData(SWT.CENTER, SWT.CENTER, false, false);
|
||||
data.widthHint = DEFAULT_WIDTH;
|
||||
data.heightHint = DEFAULT_HEIGHT;
|
||||
setLayoutData(data);
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.marginHeight = 0;
|
||||
layout.marginWidth = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue