1. Brendan Howell
  2. PyCessing

Commits

Brendan Howell  committed 0b709db

some fixes and tweaks for the editor window

  • Participants
  • Parent commits 8f2c25f
  • Branches master

Comments (0)

Files changed (1)

File mainwindow.py

View file
         tmp, self.logFile = tempfile.mkstemp()
         os.close(tmp)
 
-        self.resize(960, 500)
+        self.resize(1024, 500)
         self.setWindowTitle('PyCessing')
         self.fileName = None
         self.cwd = os.path.dirname(os.path.abspath(sys.argv[0]))
         
         self.helpwindow = QtGui.QDockWidget("Doc Browser")
         self.helpwindow.setAllowedAreas(QtCore.Qt.RightDockWidgetArea)
-        self.helpwindow.setMinimumWidth(400)
+        #self.helpwindow.setMinimumWidth(400)
         self.helpwindow.setFeatures(QtGui.QDockWidget.DockWidgetClosable | QtGui.QDockWidget.DockWidgetFloatable)
         helpAction = self.helpwindow.toggleViewAction()
         helpAction.setText("&Help Browser")
         helpAction.setShortcut(QtGui.QKeySequence("F1"))
         helpMenu.addAction(helpAction)
+ 
         self.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.helpwindow)
+        #self.helpwindow.resize(400, self.height())       
         
         helpbrowser = QtWebKit.QWebView(self.helpwindow)
         indexpath = resource_filename(__name__,"help/index.html")
         url = QtCore.QUrl("file://" + indexpath)
         helpbrowser.load(url)
-        helpbrowser.resize(400, self.helpwindow.height())
         helpbrowser.show()
+        helpbrowser.updateGeometry()
+        helpbrowser.update()
+        
+        helpbrowser.setMinimumWidth(400)
+        helpbrowser.setMinimumHeight( self.helpwindow.height())
+        sizepolicy = helpbrowser.sizePolicy()
+        sizepolicy.setVerticalPolicy(QtGui.QSizePolicy.MinimumExpanding)
+        sizepolicy.setHorizontalPolicy(QtGui.QSizePolicy.MinimumExpanding)
+
+        #sizepolicy = self.helpwindow.sizePolicy()
+        #sizepolicy.setVerticalStretch(QtGui.QSizePolicy.Expanding)
+        
+
         
 ##        helpbrowser = QtGui.QTextBrowser(self.helpwindow)
 ##        csspath = resource_filename(__name__,"help/media/css/style.css")