Finished the handling of text width, window resize, and save and load of editor config.

This commit is contained in:
Veronica K. B. Olsen
2019-04-07 23:38:34 +02:00
parent 2ed9fb12de
commit ffdcb997af
4 changed files with 71 additions and 47 deletions
+21 -2
View File
@@ -197,11 +197,30 @@ class GuiMain(QMainWindow):
self.docTabs.createTab(None,nw.DOCTYPE_ABOUT)
return True
#
##
# Events
#
##
def resizeEvent(self, theEvent):
"""Extend QMainWindow.resizeEvent to signal dependent GUI elements that its pane may have changed size.
"""
QMainWindow.resizeEvent(self,theEvent)
if self.stackPane.currentIndex() == self.stackDoc:
self.docEditor.changeWidth()
return
def closeEvent(self, theEvent):
self._closeMain()
QMainWindow.closeEvent(self,theEvent)
return
##
# Signal Handlers
##
def _splitMainMove(self, pWidth, pHeight):
"""Alert dependent GUI elements that the main pane splitter has been moved.
"""
if self.stackPane.currentIndex() == self.stackDoc:
self.docEditor.changeWidth()
return