16416N/A@@ -107,6 +107,19 @@ static void draw_nimbus_box (GtkStyle
16416N/A static GtkStyleClass *parent_class;
16416N/A+get_direction (GtkWidget *widget)
16416N/A+ dir = gtk_widget_get_direction (widget);
16416N/A static gboolean check_sane_pixbuf_value (int src_x, int src_y, int width, int height, GdkPixbuf *pixbuf)
16416N/A /*printf ("checking src_x = %d, int src_y = %d, int width = %d, int height = %d , pixbuf->height = %d, pixbuf->width = %d\n",
16416N/A@@ -353,6 +366,7 @@ draw_arrow (GtkStyle *style,
16416N/A+ int allocation_x, allocation_width;
16416N/A GType researched_type = g_type_from_name ("GtkVSeparator");
16416N/A /* get the vseparator offset if it exists */
16416N/A@@ -371,21 +385,36 @@ draw_arrow (GtkStyle *style,
16416N/A+ if (get_direction (widget) == GTK_TEXT_DIR_RTL)
16416N/A+ allocation_x = x - vsep_offset;
16416N/A draw_nimbus_box (style, window, state_type, shadow_type, NULL, widget, "combobox_arrow",
16416N/A NIMBUS_SPIN_NONE, GTK_ORIENTATION_HORIZONTAL);
16416N/A+ if (get_direction (widget) == GTK_TEXT_DIR_RTL)
16416N/A+ allocation_x = (x - vsep_offset) + (allocation_width - vsep_offset - gdk_pixbuf_get_width (rc->combo_arrow[state_type])) / 2;
16416N/A+ allocation_x = (x - vsep_offset) + (widget->parent->parent->
allocation.x + widget->parent->parent->
allocation.width - x + vsep_offset - gdk_pixbuf_get_width (rc->combo_arrow[state_type])) / 2;
16416N/A if (rc->combo_arrow[state_type])
16416N/A get_clipping_gc (window, area),
16416N/A- (x - vsep_offset) + (widget->parent->parent->
allocation.x + widget->parent->parent->
allocation.width - x + vsep_offset - gdk_pixbuf_get_width (rc->combo_arrow[state_type])) / 2,
16416N/A gdk_pixbuf_get_width (rc->combo_arrow[state_type]),
16416N/A gdk_pixbuf_get_height (rc->combo_arrow[state_type]),
16416N/A@@ -509,7 +538,10 @@ draw_tab (GtkStyle *style,
16416N/A+ if (get_direction (widget) == GTK_TEXT_DIR_RTL)
16416N/A draw_nimbus_box (style, window, state_type, shadow_type, area, widget, "option_arrow",
16416N/A@@ -1115,6 +1147,10 @@ draw_nimbus_box (GtkStyle *style,
16416N/A gboolean draw_top = TRUE, draw_bottom = TRUE, draw_partial_from_start = TRUE;
16416N/A NimbusData *rc = NIMBUS_RC_STYLE (style->rc_style)->data;
16416N/A+ GtkTextDirection direction = get_direction (widget);
16416N/A@@ -1136,61 +1172,133 @@ draw_nimbus_box (GtkStyle *style,
16416N/A- nimbus_draw_gradient (window, style, area, (NimbusGradient*)tmp->data,
16416N/A+ gradient = (NimbusGradient*)tmp->data;
16416N/A+ if ((direction == GTK_TEXT_DIR_RTL) &&
16416N/A+ (gradient->corners & CORNER_TOP_LEFT) &&
16416N/A+ ((gradient->corners & CORNER_TOP_RIGHT) == 0))
16416N/A+ gradient->corners ^= CORNER_TOP_LEFT;
16416N/A+ gradient->corners |= CORNER_TOP_RIGHT;
16416N/A+ else if ((direction == GTK_TEXT_DIR_RTL) &&
16416N/A+ ((gradient->corners & CORNER_TOP_LEFT) == 0) &&
16416N/A+ (gradient->corners & CORNER_TOP_RIGHT))
16416N/A+ gradient->corners |= CORNER_TOP_LEFT;
16416N/A+ gradient->corners ^= CORNER_TOP_RIGHT;
16416N/A+ if ((direction == GTK_TEXT_DIR_RTL) &&
16416N/A+ (gradient->corners & CORNER_BOTTOM_LEFT) &&
16416N/A+ ((gradient->corners & CORNER_BOTTOM_RIGHT) == NULL))
16416N/A+ gradient->corners ^= CORNER_BOTTOM_LEFT;
16416N/A+ gradient->corners |= CORNER_BOTTOM_RIGHT;
16416N/A+ else if ((direction == GTK_TEXT_DIR_RTL) &&
16416N/A+ ((gradient->corners & CORNER_BOTTOM_LEFT) == NULL) &&
16416N/A+ (gradient->corners & CORNER_BOTTOM_RIGHT))
16416N/A+ gradient->corners |= CORNER_BOTTOM_LEFT;
16416N/A+ gradient->corners ^= CORNER_BOTTOM_RIGHT;
16416N/A+ nimbus_draw_gradient (window, style, area, gradient,
16416N/A x, y, width, height - drop_shadow_offset,
16416N/A partial_height, draw_partial_from_start,
16416N/A- if (button->corner_top_left && draw_top)
16416N/A+ if (direction == GTK_TEXT_DIR_RTL)
16416N/A+ pixbuf = button->corner_top_right ?
16416N/A+ gdk_pixbuf_flip (button->corner_top_right, TRUE) : NULL;
16416N/A+ pixbuf = button->corner_top_left;
16416N/A get_clipping_gc (window, area),
16416N/A- gdk_pixbuf_get_width (button->corner_top_left),
16416N/A- gdk_pixbuf_get_height (button->corner_top_left),
16416N/A+ gdk_pixbuf_get_width (pixbuf),
16416N/A+ gdk_pixbuf_get_height (pixbuf),
16416N/A- if (button->corner_top_right && draw_top)
16416N/A+ if (pixbuf && direction == GTK_TEXT_DIR_RTL)
16416N/A+ if (direction == GTK_TEXT_DIR_RTL)
16416N/A+ pixbuf = button->corner_top_left ?
16416N/A+ gdk_pixbuf_flip (button->corner_top_left, TRUE) : NULL;
16416N/A+ pixbuf = button->corner_top_right;
16416N/A get_clipping_gc (window, area),
16416N/A- x+ width - gdk_pixbuf_get_width (button->corner_top_right),
16416N/A+ x+ width - gdk_pixbuf_get_width (pixbuf),
16416N/A- gdk_pixbuf_get_width (button->corner_top_right),
16416N/A- gdk_pixbuf_get_height (button->corner_top_right),
16416N/A+ gdk_pixbuf_get_width (pixbuf),
16416N/A+ gdk_pixbuf_get_height (pixbuf),
16416N/A- if (button->corner_bottom_left && draw_bottom)
16416N/A+ if (pixbuf && direction == GTK_TEXT_DIR_RTL)
16416N/A+ if (direction == GTK_TEXT_DIR_RTL)
16416N/A+ pixbuf = button->corner_bottom_right ?
16416N/A+ gdk_pixbuf_flip (button->corner_bottom_right, TRUE) : NULL;
16416N/A+ pixbuf = button->corner_bottom_left;
16416N/A- bottom_left_c_w = gdk_pixbuf_get_width (button->corner_bottom_left);
16416N/A+ bottom_left_c_w = gdk_pixbuf_get_width (pixbuf);
16416N/A get_clipping_gc (window, area),
16416N/A- y + height - gdk_pixbuf_get_height (button->corner_bottom_left),
16416N/A+ y + height - gdk_pixbuf_get_height (pixbuf),
16416N/A- gdk_pixbuf_get_height (button->corner_bottom_left),
16416N/A+ gdk_pixbuf_get_height (pixbuf),
16416N/A- if (button->corner_bottom_right && draw_bottom)
16416N/A+ if (pixbuf && direction == GTK_TEXT_DIR_RTL)
16416N/A+ if (direction == GTK_TEXT_DIR_RTL)
16416N/A+ pixbuf = button->corner_bottom_left ?
16416N/A+ gdk_pixbuf_flip (button->corner_bottom_left, TRUE) : NULL;
16416N/A+ pixbuf = button->corner_bottom_right;
16416N/A- bottom_right_c_w = gdk_pixbuf_get_width (button->corner_bottom_right);
16416N/A+ bottom_right_c_w = gdk_pixbuf_get_width (pixbuf);
16416N/A get_clipping_gc (window, area),
16416N/A- y + height - gdk_pixbuf_get_height (button->corner_bottom_right),
16416N/A+ y + height - gdk_pixbuf_get_height (pixbuf),
16416N/A- gdk_pixbuf_get_height (button->corner_bottom_right),
16416N/A+ gdk_pixbuf_get_height (pixbuf),
16416N/A+ if (pixbuf && direction == GTK_TEXT_DIR_RTL)
16416N/A if ((state_type != GTK_STATE_INSENSITIVE) && drop_shadow && draw_bottom)
16416N/A GdkPixbuf **drop_shadow = NIMBUS_RC_STYLE (style->rc_style)->dark ? rc->dark_drop_shadow : rc->drop_shadow;