Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3366
6084bb3c3911
child 3656
441956d8fce5
diff -r 96232974dcdb -r 645c12de6b0c Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py
--- a/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py	Thu Apr 03 23:05:31 2014 +0200
@@ -36,7 +36,10 @@
         self.setupUi(self)
         
         self.bTest = self.buttonBox.addButton(
-            self.trUtf8("Test"), QDialogButtonBox.ActionRole)
+            self.tr("Test"), QDialogButtonBox.ActionRole)
+        
+        msh = self.minimumSizeHint()
+        self.resize(max(self.width(), msh.width()), msh.height())
     
     def on_buttonBox_clicked(self, button):
         """
@@ -68,8 +71,8 @@
                 except:
                     E5MessageBox.critical(
                         self,
-                        self.trUtf8("QColorDialog Wizard Error"),
-                        self.trUtf8(
+                        self.tr("QColorDialog Wizard Error"),
+                        self.tr(
                             """<p>The colour <b>{0}</b> is not valid.</p>""")
                         .format(coStr))
             
@@ -150,7 +153,7 @@
             else:
                 code += '{0}QColor(Qt.white),{1}'.format(istring, os.linesep)
             code += '{0}{1},{2}'.format(istring, parent, os.linesep)
-            code += '{0}self.trUtf8("{1}"),{2}'.format(
+            code += '{0}self.tr("{1}"),{2}'.format(
                 istring, self.eTitle.text(), os.linesep)
             code += '{0}QColorDialog.ColorDialogOptions(' \
                 'QColorDialog.ShowAlphaChannel)'.format(istring)
@@ -165,7 +168,7 @@
                 code += '{0}{1},{2}'.format(
                     istring, self.eRGB.text(), os.linesep)
             code += '{0}{1},{2}'.format(istring, parent, os.linesep)
-            code += '{0}self.trUtf8("{1}"),{2}'.format(
+            code += '{0}self.tr("{1}"),{2}'.format(
                 istring, self.eTitle.text(), os.linesep)
             code += '{0}QColorDialog.ColorDialogOptions(' \
                 'QColorDialog.ShowAlphaChannel)'.format(istring)

eric ide

mercurial