summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2003-10-03 20:49:02 +0000
committerSilenio Quarti <silenio>2003-10-03 20:49:02 +0000
commit8bdc7452496d997678c005f282bcd2cc736b0512 (patch)
tree1a3ef55ecdb9c4841c6bd3c5884d5040c1b56023 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
parenta2fb28aada03076e456f5d04cff320b4b64690b6 (diff)
downloadeclipse.platform.swt-8bdc7452496d997678c005f282bcd2cc736b0512.tar.gz
eclipse.platform.swt-8bdc7452496d997678c005f282bcd2cc736b0512.tar.xz
eclipse.platform.swt-8bdc7452496d997678c005f282bcd2cc736b0512.zip
37683
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java17
1 files changed, 8 insertions, 9 deletions
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;