Ensure that the leftmost vertical gridline gets rendered in RTL mode.
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 2 Dec 2015 20:43:36 +0000 (21:43 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 2 Dec 2015 20:43:36 +0000 (21:43 +0100)
When in an RTL locale, the last (ie leftmost) vertical gridline was omitted.
This change corrects that.

Reported by: Mohammad Haghighat <hosseinhg@hotmail.com>

src/ui/gui/pspp-sheet-view.c

index 709adea3918cce671c5ea330f307be89acbda23c..65b15fe574e937d588d74b90f167373ff1d4801c 100644 (file)
@@ -3846,13 +3846,17 @@ pspp_sheet_view_draw_vertical_grid_lines (PsppSheetView    *tree_view,
       if (! column->visible)
        continue;
 
-      x += column->width;
+      if (!rtl)
+       x += column->width;
 
       cairo_set_line_width (cr, 1.0);
       cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
       cairo_move_to (cr, x + 0.5, min_y);
       cairo_line_to (cr, x + 0.5, max_y - min_y - 0.5);
       cairo_stroke (cr);
+
+      if (rtl)
+       x += column->width;
     }
 }