From cfd0b84a9b0a99a7ba39913baa6f1ddbdc0d7a3f Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Fri, 3 Aug 2012 23:04:51 -0400 Subject: [PATCH] STY: Tweak button sizes. --- skimage/viewer/widgets/history.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skimage/viewer/widgets/history.py b/skimage/viewer/widgets/history.py index cc586579..bb65b7dd 100644 --- a/skimage/viewer/widgets/history.py +++ b/skimage/viewer/widgets/history.py @@ -16,16 +16,19 @@ class OKCancelButtons(BaseWidget): OK will replace the original image with the current (filtered) image. Cancel will just close the plugin. """ - def __init__(self): + def __init__(self, button_width=80): name = 'OK/Cancel' super(OKCancelButtons, self).__init__(name) self.ok = QtGui.QPushButton('OK') self.ok.clicked.connect(self.update_original_image) + self.ok.setMaximumWidth(button_width) self.cancel = QtGui.QPushButton('Cancel') self.cancel.clicked.connect(self.close_plugin) + self.cancel.setMaximumWidth(button_width) self.layout = QtGui.QHBoxLayout(self) + self.layout.addStretch() self.layout.addWidget(self.cancel) self.layout.addWidget(self.ok)