A developer from the local linux community provided a patch to solve the
issues. Below is his post in the local forum
(http://whatsup.org.il/forum/56115) translated into English.

********************************************************


=== modified file 'softwarecenter/view/appview.py'

--- softwarecenter/view/appview.py   2011-02-24 10:07:19 +0000

+++ softwarecenter/view/appview.py   2011-03-12 16:29:50 +0000

@@ -399,16 +399,23 @@

         return


     def _render_rating(self, window, widget, state, cell_area, xpad,
ypad, direction, spacing=3):

-        # draw stars on the top right

+        # draw stars on the top right or left

         cr = window.cairo_create()


         # for the sake of aesthetics,

         # star width should be approx 1/5 the width of the action
button

         sw = sh = self.get_button_by_name('action0').get_size()[0] / 5

+        rtl = (direction == gtk.TEXT_DIR_RTL)


         for i in range(0, self.MAX_STARS):

-            x = cell_area.x + cell_area.width - xpad -
(self.MAX_STARS-i)*sw

+            if rtl:

+                x_offset  = xpad + i*sw

+            else: # TEXT_DIR_LTR or TEXT_DIR_NONE

+                x_offset = cell_area.width - xpad -
(self.MAX_STARS-i)*sw

+

+            x = cell_area.x + x_offset

             y = cell_area.y + ypad

+

             if i < int(self.rating):

                 self._star_painter.set_fill(StarPainter.FILL_FULL)

             elif (i == int(self.rating) and


********************************************************

I left the order of stars as is, I just moved them to the opposite
direction of the text.

Do 'bzr clone', then save the above lines in a file, then 'bzr patch'.

You may also try changing the line:

x_offset  = xpad + i*sw

x_offset  = xpad + (self.MAX_STARS-i)*sw

for a different look of the solution.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/733087

Title:
  software ratings (stars) override package name in right to left
  encoding

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to