STY: Tweak button sizes.

This commit is contained in:
Tony S Yu
2012-08-03 23:04:51 -04:00
parent e96aca5637
commit cfd0b84a9b
+4 -1
View File
@@ -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)