# HG changeset patch # User Neil Muller # Date 1316214172 -7200 # Node ID 8b9cfc4f0f019cc3c878670e62b35c574e68dd28 # Parent f74723ccd68a21d3bce4d374353060cdfce39652 Use right edge of OK button to place cancel buttons diff -r f74723ccd68a -r 8b9cfc4f0f01 mamba/widgets/editsprite.py --- a/mamba/widgets/editsprite.py Sat Sep 17 01:22:17 2011 +0200 +++ b/mamba/widgets/editsprite.py Sat Sep 17 01:02:52 2011 +0200 @@ -45,7 +45,8 @@ self.ok_button = TextButton((self.rect.left + 10, height), 'OK') self.ok_button.add_callback('clicked', self.close, True) self.add(self.ok_button) - cancel_button = TextButton((self.rect.left + 100, height), 'Cancel') + cancel_button = TextButton((self.ok_button.rect.right + 10, height), + 'Cancel') cancel_button.add_callback('clicked', self.close, False) self.add(cancel_button) self.rect.width = max(self.rect.width, 400) diff -r f74723ccd68a -r 8b9cfc4f0f01 mamba/widgets/entrybox.py --- a/mamba/widgets/entrybox.py Sat Sep 17 01:22:17 2011 +0200 +++ b/mamba/widgets/entrybox.py Sat Sep 17 01:02:52 2011 +0200 @@ -33,7 +33,7 @@ ok_button.add_callback('clicked', self.close, True) self.add(ok_button) cancel_button = ok_button = TextButton( - (self.entry_text.rect.right + 60, self.entry_text.rect.bottom), + (ok_button.rect.right + 10, self.entry_text.rect.bottom), 'Cancel') cancel_button.add_callback('clicked', self.close, False) self.add(cancel_button) @@ -57,6 +57,7 @@ if hasattr(self.parent, 'paused'): self.parent.paused = False self.parent.remove(self) + return True def edit(self, ev, widget): if ev.key == K_ESCAPE: