From 8bdc7452496d997678c005f282bcd2cc736b0512 Mon Sep 17 00:00:00 2001 From: Silenio Quarti Date: Fri, 3 Oct 2003 20:49:02 +0000 Subject: 37683 --- .../gtk/org/eclipse/swt/widgets/Scrollable.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java') diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index 39f2e1b7bd..2f9a55c647 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -109,12 +109,13 @@ public Rectangle computeTrim (int x, int y, int width, int height) { trimWidth += vScrollBarWidth (); if (scrolledHandle != 0) { if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) { - GtkStyle style = new GtkStyle (); - OS.memmove (style, OS.gtk_widget_get_style (scrolledHandle)); - trimX -= style.xthickness; - trimY -= style.ythickness; - trimWidth += style.xthickness * 2; - trimHeight += style.ythickness * 2; + int style = OS.gtk_widget_get_style (scrolledHandle); + int xthickness = OS.gtk_style_get_xthickness (style); + int ythickness = OS.gtk_style_get_ythickness (style); + trimX -= xthickness; + trimY -= ythickness; + trimWidth += xthickness * 2; + trimHeight += ythickness * 2; } } return new Rectangle (trimX, trimY, trimWidth, trimHeight); @@ -155,9 +156,7 @@ public int getBorderWidth () { if (scrolledHandle != 0) { border += OS.gtk_container_get_border_width (scrolledHandle); if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) { - GtkStyle style = new GtkStyle (); - OS.memmove (style, OS.gtk_widget_get_style (scrolledHandle)); - border += style.xthickness; + border += OS.gtk_style_get_xthickness (OS.gtk_widget_get_style (scrolledHandle)); } } return border; -- cgit