diff options
-rw-r--r-- | perl-install/ugtk2.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 3072aadaf..2d463648b 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1504,14 +1504,18 @@ sub RENDER { # not that efficient... my $layout = $cell->get_layout($widget); $layout->set_text($cell->get('label')); + my $is_rtl = lang::text_direction_rtl(); + my $txt_width = ($layout->get_pixel_size)[0]; + my ($x_offset, $y_offset, $_width, $_height) = calc_size($cell, $layout); my $pixbuf = $cell->get('pixbuf'); my ($pwidth, $pheight) = pixbuf_size($cell); + my $txt_offset = $cell_area->x + $x_offset + $x_padding * 2 + $pwidth; if ($pixbuf) { $pixbuf->render_to_drawable($window, $widget->style->fg_gc('normal'), 0, 0, - $cell_area->x ,#+ $x_padding, + $is_rtl ? $cell_area->width - $cell_area->x - $pwidth : $cell_area->x ,#+ $x_padding, $cell_area->y, #+ $y_padding, $pwidth, $pheight, 'none', 0, 0); } @@ -1521,7 +1525,7 @@ sub RENDER { # not that efficient... $cell_area, $widget, "cellrenderertext", - $cell_area->x + $x_offset + $x_padding * 2 + $pwidth, + $is_rtl ? $cell_area->width - $txt_width - $txt_offset : $txt_offset, $cell_area->y + $y_offset + $y_padding, $layout); |