summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
index ed57668988..8a5b3fcde0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
@@ -150,23 +150,12 @@ void destroyWidget () {
*/
public Rectangle getBounds () {
checkWidget();
- int x = 0;
- int y = 0;
- int width = 0;
- int height = 0;
GtkAllocation allocation = new GtkAllocation ();
- if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
- OS.gtk_widget_get_allocation(handle, allocation);
- x = allocation.x;
- y = allocation.y;
- width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
- height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
- } else {
- x = OS.GTK_WIDGET_X (handle);
- y = OS.GTK_WIDGET_Y (handle);
- width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle);
- height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (handle);
- }
+ gtk_widget_get_allocation (handle, allocation);
+ int x = allocation.x;
+ int y = allocation.y;
+ int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+ int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
return new Rectangle (x, y, width, height);
}