From 0ed83e849f6952afe47d22ae6480c05581bf239e Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann <humitos@gmail.com>
Date: Tue, 12 Jun 2012 07:59:09 -0300
Subject: [PATCH Paint] Center images smaller than the canvas SL #3677
Instead of showing the image at the top of the canvas we center it.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
---
Area.py | 2 +-
OficinaActivity.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Area.py b/Area.py
index d8997a1..b8d135c 100644
a
|
b
|
class Area(gtk.DrawingArea): |
1252 | 1252 | height, width, dither=gtk.gdk.RGB_DITHER_NORMAL, |
1253 | 1253 | x_dither=0, y_dither=0) |
1254 | 1254 | |
1255 | | self.activity.center_area() |
| 1255 | self.activity.fixed.move(0, 0) |
1256 | 1256 | |
1257 | 1257 | del temp_pix |
1258 | 1258 | |
diff --git a/OficinaActivity.py b/OficinaActivity.py
index 1745d0a..a74b7c1 100644
a
|
b
|
class OficinaActivity(activity.Activity): |
207 | 207 | |
208 | 208 | def center_area(self): |
209 | 209 | x, y = self._get_area_displacement() |
210 | | self.fixed.move(self.area, x, 0) |
| 210 | self.fixed.move(self.area, x, y) |
211 | 211 | |
212 | 212 | def move_textview(self, dx, dy): |
213 | 213 | x, y = self._get_area_displacement() |