Fixed a bug with images getting pushed around at the top of the page.
This commit is contained in:
parent
9ebc928391
commit
b1396cd70a
1 changed files with 4 additions and 4 deletions
|
|
@ -176,12 +176,12 @@ class WindowSurface(object):
|
|||
|
||||
if center_horizontal:
|
||||
x += width/2.0 - new_width/2.0
|
||||
if x < 0:
|
||||
x = 0
|
||||
if x < self.position.x:
|
||||
x = self.position.x
|
||||
if center_vertical:
|
||||
y += height/2.0 - new_height/2.0
|
||||
if y < 0:
|
||||
y = 0
|
||||
if y < self.position.y:
|
||||
y = self.position.y
|
||||
|
||||
im_surf = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(new_width), int(new_height))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue