diff options
author | Steve Northover <steve> | 2002-07-08 18:31:24 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2002-07-08 18:31:24 +0000 |
commit | bca7c728e3514857ee0694a748f9b34a5ee11a55 (patch) | |
tree | e678f8a78244097df5bc9cea0d0561c2c08fd9fe /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java | |
parent | bd74e748c19823c825c12e0c2299ba7c2ee05dac (diff) | |
download | eclipse.platform.swt-bca7c728e3514857ee0694a748f9b34a5ee11a55.tar.gz eclipse.platform.swt-bca7c728e3514857ee0694a748f9b34a5ee11a55.tar.xz eclipse.platform.swt-bca7c728e3514857ee0694a748f9b34a5ee11a55.zip |
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java index 929029062c..e2e6d329bf 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java @@ -167,9 +167,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) { OS.GetWindowRect (handle, oldRect);
int oldWidth = oldRect.right - oldRect.left;
int oldHeight = oldRect.bottom - oldRect.top;
- int newWidth = wHint, newHeight = hHint;
- if (newWidth == SWT.DEFAULT) newWidth = 0x3FFF;
- if (newHeight == SWT.DEFAULT) newHeight = 0x3FFF;
+ int border = getBorderWidth ();
+ int newWidth = wHint == SWT.DEFAULT ? 0x3FFF : wHint + (border * 2);
+ int newHeight = hHint == SWT.DEFAULT ? 0x3FFF : hHint + (border * 2);
ignoreResize = true;
OS.UpdateWindow (handle);
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOREDRAW | OS.SWP_NOZORDER;
@@ -200,10 +200,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) { return new Point (width, height);
}
-
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
- Rectangle trim = super. computeTrim (x, y, width, height);
+ Rectangle trim = super.computeTrim (x, y, width, height);
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.CCS_NODIVIDER) == 0) trim.height += 2;
return trim;
|