Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/moon.py
diff options
context:
space:
mode:
authorGary Martin <gary@garycmartin.com>2009-11-26 22:43:54 (GMT)
committer Gary Martin <gary@garycmartin.com>2009-11-26 22:43:54 (GMT)
commitd150d6e618f9de9154b2e324cfeb4ed21dfbdb86 (patch)
tree37af4bfcef2e36decf07ec3b185ac436e269e5fe /moon.py
parentb08b4aa4fa1b30e01d00e2922cf9b72d4ac5cd00 (diff)
Adjustment to compass and labels positions to give more spacing away from widget edges.
Diffstat (limited to 'moon.py')
-rwxr-xr-xmoon.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/moon.py b/moon.py
index 39a5067..3a6e88a 100755
--- a/moon.py
+++ b/moon.py
@@ -411,22 +411,22 @@ class MoonActivity(activity.Activity):
# Key text
pango_layout.set_text(_("Latitude"))
- self.image_pixmap.draw_layout(bgc, 0, IMAGE_SIZE - 48, pango_layout)
+ self.image_pixmap.draw_layout(bgc, 15, IMAGE_SIZE - 48 - 15, pango_layout)
pango_layout.set_text(_("Longitude"))
- self.image_pixmap.draw_layout(rgc, 0, IMAGE_SIZE - 24, pango_layout)
+ self.image_pixmap.draw_layout(rgc, 15, IMAGE_SIZE - 24 - 15, pango_layout)
# Compass
# TODO: fix string index to support multi-byte texts
- self.image_pixmap.draw_line(bgc, 45, 24, 45, 68)
- self.image_pixmap.draw_line(rgc, 22, 48, 68, 48)
+ self.image_pixmap.draw_line(bgc, 45 + 15, 24 + 15, 45 + 15, 68 + 15)
+ self.image_pixmap.draw_line(rgc, 22 + 15, 48 + 15, 68 + 15, 48 + 15)
pango_layout.set_text(compass_text[0])
- self.image_pixmap.draw_layout(bgc, 38, 0, pango_layout)
+ self.image_pixmap.draw_layout(bgc, 38 + 15, 15, pango_layout)
pango_layout.set_text(compass_text[1])
- self.image_pixmap.draw_layout(bgc, 38, 72, pango_layout)
+ self.image_pixmap.draw_layout(bgc, 38 + 15, 72 + 15, pango_layout)
pango_layout.set_text(compass_text[2])
- self.image_pixmap.draw_layout(rgc, 72, 36, pango_layout)
+ self.image_pixmap.draw_layout(rgc, 72 + 15, 36 + 15, pango_layout)
pango_layout.set_text(compass_text[3])
- self.image_pixmap.draw_layout(rgc, 0, 36, pango_layout)
+ self.image_pixmap.draw_layout(rgc, 15, 36 + 15, pango_layout)
def _moon_size_allocate_cb(self, widget, allocation):
global IMAGE_SIZE, HALF_SIZE