Fix traceback

This commit is contained in:
Marco Pesenti Gritti 2007-06-27 11:41:41 +02:00
parent 4f748dba9b
commit 2507104875

View File

@ -160,13 +160,13 @@ class Palette(gobject.GObject):
move_x = inv_rect.x move_x = inv_rect.x
move_y = inv_rect.y + inv_rect.height move_y = inv_rect.y + inv_rect.height
elif alignment == ALIGNMENT_BOTTOM_RIGHT: elif alignment == ALIGNMENT_BOTTOM_RIGHT:
move_x = (inv_rect.x + inv_rect.width) - self._width move_x = (inv_rect.x + inv_rect.width) - palette_rect.width
move_y = inv_rect.y + inv_rect.height move_y = inv_rect.y + inv_rect.height
elif alignment == ALIGNMENT_LEFT_BOTTOM: elif alignment == ALIGNMENT_LEFT_BOTTOM:
move_x = inv_rect.x - self._width move_x = inv_rect.x - palette_rect.width
move_y = inv_rect.y move_y = inv_rect.y
elif alignment == ALIGNMENT_LEFT_TOP: elif alignment == ALIGNMENT_LEFT_TOP:
move_x = inv_rect.x - self._width move_x = inv_rect.x - palette_rect.width
move_y = (inv_rect.y + inv_rect.height) - palette_rect.height move_y = (inv_rect.y + inv_rect.height) - palette_rect.height
elif alignment == ALIGNMENT_RIGHT_BOTTOM: elif alignment == ALIGNMENT_RIGHT_BOTTOM:
move_x = inv_rect.x + inv_rect.width move_x = inv_rect.x + inv_rect.width
@ -178,7 +178,7 @@ class Palette(gobject.GObject):
move_x = inv_rect.x move_x = inv_rect.x
move_y = inv_rect.y - palette_rect.height move_y = inv_rect.y - palette_rect.height
elif alignment == ALIGNMENT_TOP_RIGHT: elif alignment == ALIGNMENT_TOP_RIGHT:
move_x = (inv_rect.x + inv_rect.width) - self._width move_x = (inv_rect.x + inv_rect.width) - palette_rect.width
move_y = inv_rect.y - palette_rect.height move_y = inv_rect.y - palette_rect.height
return move_x, move_y return move_x, move_y