forked from openlp/openlp
Save the splitter states and make the progressbar smaller.
bzr-revno: 1666 Fixes: https://launchpad.net/bugs/765239
This commit is contained in:
commit
9f0bd17703
@ -65,6 +65,12 @@ MEDIA_MANAGER_STYLE = """
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
PROGRESSBAR_STYLE = """
|
||||||
|
QProgressBar{
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
class Ui_MainWindow(object):
|
class Ui_MainWindow(object):
|
||||||
def setupUi(self, mainWindow):
|
def setupUi(self, mainWindow):
|
||||||
"""
|
"""
|
||||||
@ -130,6 +136,7 @@ class Ui_MainWindow(object):
|
|||||||
self.statusBar.addPermanentWidget(self.loadProgressBar)
|
self.statusBar.addPermanentWidget(self.loadProgressBar)
|
||||||
self.loadProgressBar.hide()
|
self.loadProgressBar.hide()
|
||||||
self.loadProgressBar.setValue(0)
|
self.loadProgressBar.setValue(0)
|
||||||
|
self.loadProgressBar.setStyleSheet(PROGRESSBAR_STYLE)
|
||||||
self.defaultThemeLabel = QtGui.QLabel(self.statusBar)
|
self.defaultThemeLabel = QtGui.QLabel(self.statusBar)
|
||||||
self.defaultThemeLabel.setObjectName(u'defaultThemeLabel')
|
self.defaultThemeLabel.setObjectName(u'defaultThemeLabel')
|
||||||
self.statusBar.addPermanentWidget(self.defaultThemeLabel)
|
self.statusBar.addPermanentWidget(self.defaultThemeLabel)
|
||||||
@ -1030,6 +1037,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.restoreGeometry(
|
self.restoreGeometry(
|
||||||
settings.value(u'main window geometry').toByteArray())
|
settings.value(u'main window geometry').toByteArray())
|
||||||
self.restoreState(settings.value(u'main window state').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()
|
settings.endGroup()
|
||||||
|
|
||||||
def saveSettings(self):
|
def saveSettings(self):
|
||||||
@ -1050,6 +1064,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.QVariant(self.saveState()))
|
QtCore.QVariant(self.saveState()))
|
||||||
settings.setValue(u'main window geometry',
|
settings.setValue(u'main window geometry',
|
||||||
QtCore.QVariant(self.saveGeometry()))
|
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()
|
settings.endGroup()
|
||||||
|
|
||||||
def updateFileMenu(self):
|
def updateFileMenu(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user