Community
Participate
Working Groups
This patch replace gtk_paint_arrow with gtk_render_arrow for GTK+ 3: http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=gtk3_paint_arrow Patch is based on 2 pieces of documentation: 1. "angle" and "size" variables determined basing on http://git.gnome.org/browse/gtk+/tree/gtk/deprecated/gtkstyle.c#n1805 2. Helper function is based on: https://mail.gnome.org/archives/commits-list/2012-July/msg07494.html
Redoing what upstream did is really the right way for now. Merged to master http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8292090fe3ef8e634ba254763ccf7af619dd517a
I think gtk_paint_arrow () can be directly replaced by gtk_render_arrow () as in https://lists.gnome.org/archives/commits-list/2012-June/msg02768.html The calls to gtk_render_background () and gtk_render_frame () are needed only when replacing gtk_paint_box () according to this - https://lists.gnome.org/archives/commits-list/2012-June/msg02785.html and even https://mail.gnome.org/archives/commits-list/2012-July/msg07494.html from comment 0. So, you can probably get rid of these 3 lines in this case: OS.gtk_style_context_set_state(context, state_type); OS.gtk_render_background(context, cairo, x, y, width, height); OS.gtk_render_frame (context, cairo, x, y, width, height);
(In reply to comment #2) > I think gtk_paint_arrow () can be directly replaced by gtk_render_arrow () > as in https://lists.gnome.org/archives/commits-list/2012-June/msg02768.html > > The calls to gtk_render_background () and gtk_render_frame () are needed > only when replacing gtk_paint_box () according to this - > https://lists.gnome.org/archives/commits-list/2012-June/msg02785.html and > even https://mail.gnome.org/archives/commits-list/2012-July/msg07494.html > from comment 0. So, you can probably get rid of these 3 lines in this case: > > OS.gtk_style_context_set_state(context, state_type); > OS.gtk_render_background(context, cairo, x, y, width, height); > OS.gtk_render_frame (context, cairo, x, y, width, height); Yeah, probably you're right but there is only one way to know it - run on top of GTK3.