From 9865cee9e9d2eb3f1509c307328abba387189c27 Mon Sep 17 00:00:00 2001 From: Matias De lellis Date: Sat, 14 Feb 2015 09:10:44 -0300 Subject: [PATCH] Fix calculation of shadows that are offset in RTL text (Bug #5239) --- src/xfdesktop-icon-view.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c index 8f1cdc4..e4d646a 100644 --- a/src/xfdesktop-icon-view.c +++ b/src/xfdesktop-icon-view.c @@ -2995,7 +2995,6 @@ xfdesktop_icon_view_draw_text(cairo_t *cr, PangoLayout *playout, GdkRectangle *t box_area.x + extents + x_offset - rtl_offset, box_area.y + extents + y_offset); - if (blur_radius > 1) { cr = gtk_css_shadow_value_start_drawing (cr, blur_radius); pango_cairo_show_layout (cr, playout); @@ -3089,6 +3088,7 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView *icon_view, if(gdk_rectangle_intersect(area, &text_extents, &intersection) && icon_view->priv->font_size > 0) { + text_extents.x += rtl_offset; xfdesktop_paint_rounded_box(icon_view, state, &text_extents, area); if (state == GTK_STATE_NORMAL) { @@ -3113,6 +3113,8 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView *icon_view, sh_text_col); } + text_extents.x -= rtl_offset; + TRACE("painting text at %dx%d+%d+%d", text_extents.width, text_extents.height, text_extents.x, text_extents.y); -- 1.9.3