diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-10-05 13:54:10 -0400 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-05 21:29:24 +0300 |
commit | d20287fc0028770d688fd3fc76eadc9c310edecb (patch) | |
tree | ce1ee2b8970a1be65f474541afdddcfadb5ed257 /bundles/org.eclipse.swt/Eclipse SWT Theme | |
parent | 6b085655091946913301a320f96fff5fdea79bb9 (diff) | |
download | eclipse.platform.swt-d20287fc0028770d688fd3fc76eadc9c310edecb.tar.gz eclipse.platform.swt-d20287fc0028770d688fd3fc76eadc9c310edecb.tar.xz eclipse.platform.swt-d20287fc0028770d688fd3fc76eadc9c310edecb.zip |
Use gtk_render_frame_gap instead of gtk_paint_box_gap for GTK+ 3
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Theme')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/TabFolderDrawData.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/TabFolderDrawData.java b/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/TabFolderDrawData.java index 84cabdfd04..8925d453a4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/TabFolderDrawData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Theme/gtk/org/eclipse/swt/internal/theme/TabFolderDrawData.java @@ -13,6 +13,7 @@ package org.eclipse.swt.internal.theme; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.*; +import org.eclipse.swt.internal.cairo.Cairo; import org.eclipse.swt.internal.gtk.*; public class TabFolderDrawData extends DrawData { @@ -44,7 +45,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) { y += tabsHeight; } byte[] detail = Converter.wcsToMbcs(null, "notebook", true); - OS.gtk_paint_box_gap(gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); + gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; @@ -64,4 +65,15 @@ int hit(Theme theme, Point position, Rectangle bounds) { return bounds.contains(position) ? DrawData.WIDGET_WHOLE : DrawData.WIDGET_NOWHERE; } +void gtk_render_frame_gap (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, int gap_side, int gap_x, int gap_width) { + 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_gap (context, cairo, context, y, gap_width, height, gap_side, gap_x, gap_x + gap_width); + Cairo.cairo_destroy (cairo); + } else { + OS.gtk_paint_box_gap (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width); + } +} + } |