[gcompris] fix fuel tank being over the text if the translation is too long.



commit fb4473946bd007a41a096337a1cd2fc2a11c6b50
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Mon Jan 28 23:45:39 2013 +0100

    fix fuel tank being over the text if the translation is too long.

 src/land_safe-activity/land_safe.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/land_safe-activity/land_safe.py b/src/land_safe-activity/land_safe.py
index daaf24c..6dc62a5 100644
--- a/src/land_safe-activity/land_safe.py
+++ b/src/land_safe-activity/land_safe.py
@@ -469,11 +469,12 @@ class Display:
       text = _('Fuel'))
 
     # fuel tank
+    bounds = fuel_text.get_bounds()
     rectangle = goocanvas.Rect(
       parent = rootitem,
-      radius_x = 10,
-      radius_y = 10,
-      x = 65.0,
+      radius_x = 5,
+      radius_y = 5,
+      x = bounds.x2 + 5,
       y = 40.0,
       width = 100,
       height = 20,
@@ -483,9 +484,9 @@ class Display:
     self.fuel_amt = 96
     self.fuel_tank = goocanvas.Rect(
       parent = rootitem,
-      radius_x = 10,
-      radius_y = 10,
-      x = 66.5,
+      radius_x = 5,
+      radius_y = 5,
+      x = bounds.x2 + 6,
       y = 41.3,
       width = self.fuel_amt,
       height = 16.5,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]