← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/lock-toolbar into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/lock-toolbar into lp:openlp.

Requested reviews:
  Andreas Preikschat (googol)
Related bugs:
  Bug #765239 in OpenLP: "Not all parts of screen layout being saved"
  https://bugs.launchpad.net/openlp/+bug/765239

For more details, see:
https://code.launchpad.net/~trb143/openlp/lock-toolbar/+merge/66343

save the Live and Preview splitter positions on exit and reset on load
Mark the progress bar smaller and less in your face.
-- 
https://code.launchpad.net/~trb143/openlp/lock-toolbar/+merge/66343
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2011-06-27 15:56:48 +0000
+++ openlp/core/ui/mainwindow.py	2011-06-29 16:16:07 +0000
@@ -65,6 +65,12 @@
   }
 """
 
+PROGRESSBAR_STYLE = """
+    QProgressBar{
+       height: 10px;
+    }
+"""
+
 class Ui_MainWindow(object):
     def setupUi(self, mainWindow):
         """
@@ -130,6 +136,7 @@
         self.statusBar.addPermanentWidget(self.loadProgressBar)
         self.loadProgressBar.hide()
         self.loadProgressBar.setValue(0)
+        self.loadProgressBar.setStyleSheet(PROGRESSBAR_STYLE)
         self.defaultThemeLabel = QtGui.QLabel(self.statusBar)
         self.defaultThemeLabel.setObjectName(u'defaultThemeLabel')
         self.statusBar.addPermanentWidget(self.defaultThemeLabel)
@@ -1030,6 +1037,13 @@
         self.restoreGeometry(
             settings.value(u'main window geometry').toByteArray())
         self.restoreState(settings.value(u'main window state').toByteArray())
+        self.liveController.splitter.restoreState(
+            settings.value(u'live splitter geometry').toByteArray())
+        self.previewController.splitter.restoreState(
+            settings.value(u'preview splitter geometry').toByteArray())
+        self.controlSplitter.restoreState(
+            settings.value(u'mainwindow splitter geometry').toByteArray())
+
         settings.endGroup()
 
     def saveSettings(self):
@@ -1050,6 +1064,12 @@
             QtCore.QVariant(self.saveState()))
         settings.setValue(u'main window geometry',
             QtCore.QVariant(self.saveGeometry()))
+        settings.setValue(u'live splitter geometry',
+            QtCore.QVariant(self.liveController.splitter.saveState()))
+        settings.setValue(u'preview splitter geometry',
+            QtCore.QVariant(self.previewController.splitter.saveState()))
+        settings.setValue(u'mainwindow splitter geometry',
+            QtCore.QVariant(self.controlSplitter.saveState()))
         settings.endGroup()
 
     def updateFileMenu(self):


Follow ups