Project/NewDialogClassDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3366
6084bb3c3911
child 3656
441956d8fce5
--- a/Project/NewDialogClassDialog.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/Project/NewDialogClassDialog.py	Thu Apr 03 23:05:31 2014 +0200
@@ -19,6 +19,8 @@
 
 from .Ui_NewDialogClassDialog import Ui_NewDialogClassDialog
 
+import UI.PixmapCache
+
 
 class NewDialogClassDialog(QDialog, Ui_NewDialogClassDialog):
     """
@@ -37,6 +39,8 @@
         super(NewDialogClassDialog, self).__init__(parent)
         self.setupUi(self)
         
+        self.pathButton.setIcon(UI.PixmapCache.getIcon("open.png"))
+        
         self.okButton = self.buttonBox.button(QDialogButtonBox.Ok)
         self.okButton.setEnabled(False)
         
@@ -46,6 +50,9 @@
         self.filenameEdit.setText(defaultFile)
         self.pathnameEdit.setText(QDir.toNativeSeparators(defaultPath))
         
+        msh = self.minimumSizeHint()
+        self.resize(max(self.width(), msh.width()), msh.height())
+        
     @pyqtSlot()
     def on_pathButton_clicked(self):
         """
@@ -53,7 +60,7 @@
         """
         path = E5FileDialog.getExistingDirectory(
             self,
-            self.trUtf8("Select source directory"),
+            self.tr("Select source directory"),
             QDir.fromNativeSeparators(self.pathnameEdit.text()))
         if path:
             self.pathnameEdit.setText(QDir.toNativeSeparators(path))

eric ide

mercurial