diff options
author | Felipe Heidrich <fheidric> | 2003-07-17 19:16:44 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2003-07-17 19:16:44 +0000 |
commit | 95589cb666bce16683672158ba6c846ed5f21690 (patch) | |
tree | eb12d99e728ab8de9020f1ebac243d7d9c755529 | |
parent | b793a454a5222757c1ab07d7ee6fab3591e468b1 (diff) | |
download | eclipse.platform.swt-95589cb666bce16683672158ba6c846ed5f21690.tar.gz eclipse.platform.swt-95589cb666bce16683672158ba6c846ed5f21690.tar.xz eclipse.platform.swt-95589cb666bce16683672158ba6c846ed5f21690.zip |
*** empty log message ***v3014c
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java index 5acbb8ba8d..6d34fe24a4 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java @@ -289,7 +289,16 @@ public Rectangle getBounds () { int topHandle = topHandle (); PhArea_t area = new PhArea_t (); OS.PtWidgetArea (topHandle, area); - return new Rectangle (area.pos_x, area.pos_y, area.size_w, area.size_h); + int x = area.pos_x, y = area.pos_y; + int width = area.size_w, height = area.size_h; + /* Check if the item is scrolled */ + int child = OS.PtWidgetChildBack (parent.handle); + if (child != 0) { + OS.PtWidgetArea (child, area); + x += area.pos_x; + y += area.pos_y; + } + return new Rectangle (x, y, width, height); } /** |