diff options
author | Felipe Heidrich <fheidric> | 2005-02-15 21:44:35 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2005-02-15 21:44:35 +0000 |
commit | 5b3ec303ac0d2af543a2733646c7864facee0355 (patch) | |
tree | 6e1eefb19f51eaae45675ac92e2b2ed7ef852832 /bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java | |
parent | d65c1273481baba598b2c773f1d6efc705d601fd (diff) | |
download | eclipse.platform.swt-5b3ec303ac0d2af543a2733646c7864facee0355.tar.gz eclipse.platform.swt-5b3ec303ac0d2af543a2733646c7864facee0355.tar.xz eclipse.platform.swt-5b3ec303ac0d2af543a2733646c7864facee0355.zip |
85236
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java index 4d300b999b..18406864af 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java @@ -106,10 +106,22 @@ public void addSelectionListener (SelectionListener listener) { public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); + if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; + if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; + int width, height; int layoutWidth = layout.getWidth (); - layout.setWidth (wHint); - Rectangle rect = layout.getBounds (); - int width = rect.width, height = rect.height; + //TEMPORARY CODE + if (wHint == 0) { + layout.setWidth (1); + Rectangle rect = layout.getBounds (); + width = 0; + height = rect.height; + } else { + layout.setWidth (wHint); + Rectangle rect = layout.getBounds (); + width = rect.width; + height = rect.height; + } layout.setWidth (layoutWidth); if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; |