summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-10-04 15:58:12 -0400
committerAlexander Kurtakov <akurtako@redhat.com>2012-10-04 23:08:55 +0300
commitf595bd26249b063ab16f669e49ee726a84b4ab51 (patch)
treede8671c563998539ca405cc282006a6bcd1e6744 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
parent3fdc19a025bdb1d1c9714427e7323556f1c5dd33 (diff)
downloadeclipse.platform.swt-f595bd26249b063ab16f669e49ee726a84b4ab51.tar.gz
eclipse.platform.swt-f595bd26249b063ab16f669e49ee726a84b4ab51.tar.xz
eclipse.platform.swt-f595bd26249b063ab16f669e49ee726a84b4ab51.zip
Use gtk_render_frame and gtk_render_background instead of gtk_paint_box
This patch also fixes change in Shell.java where wrong helper function (gtk_render_frame) was used instead of gtk_render_box.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index fcfc9db3ee..d8dac6457d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -13,6 +13,7 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
import org.eclipse.swt.internal.gtk.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.events.*;
@@ -1260,7 +1261,7 @@ long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ event) {
gtk_render_frame (style, window, state, OS.GTK_SHADOW_NONE, area, widget, detail, 0, height [0] - border, width [0], border);
gtk_render_frame (style, window, state, OS.GTK_SHADOW_NONE, area, widget, detail, 0, border, border, height [0] - border - border);
gtk_render_frame (style, window, state, OS.GTK_SHADOW_NONE, area, widget, detail, width [0] - border, border, border, height [0] - border - border);
- gtk_render_frame (style, window, state, OS.GTK_SHADOW_OUT, area, widget, detail, 0, 0, width [0], height [0]);
+ gtk_render_box (style, window, state, OS.GTK_SHADOW_OUT, area, widget, detail, 0, 0, width [0], height [0]);
return 1;
}
return 0;
@@ -2567,4 +2568,16 @@ void setToolTipText (long /*int*/ rootWidget, long /*int*/ tipWidget, String str
}
}
+
+void gtk_render_box (long /*int*/ style, long /*int*/ window, int state_type, int shadow_type, GdkRectangle area, long /*int*/ widget, byte[] detail, int x , int y, int width, int height) {
+ if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
+ long /*int*/ cairo = OS.gdk_cairo_create (window);
+ long /*int*/ context = OS.gtk_widget_get_style_context (style);
+ OS.gtk_render_frame (context, cairo, x, y, width, height);
+ OS.gtk_render_background (context, cairo, x, y, width, height);
+ Cairo.cairo_destroy (cairo);
+ } else {
+ OS.gtk_paint_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
}