forked from openlp/openlp
Naming fixes for toolbar and maindisplay
This commit is contained in:
parent
cde04a9218
commit
19a831d9cf
@ -71,27 +71,27 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
``objectname``
|
||||
The name of the object, as used in `<button>.setObjectName()`.
|
||||
"""
|
||||
ToolbarButton = None
|
||||
toolbarButton = None
|
||||
if icon:
|
||||
ButtonIcon = build_icon(icon)
|
||||
buttonIcon = build_icon(icon)
|
||||
if slot and not checkable:
|
||||
ToolbarButton = self.addAction(ButtonIcon, title, slot)
|
||||
toolbarButton = self.addAction(buttonIcon, title, slot)
|
||||
else:
|
||||
ToolbarButton = self.addAction(ButtonIcon, title)
|
||||
self.icons[title] = ButtonIcon
|
||||
toolbarButton = self.addAction(buttonIcon, title)
|
||||
self.icons[title] = buttonIcon
|
||||
else:
|
||||
ToolbarButton = QtGui.QAction(title, ToolbarButton)
|
||||
self.addAction(ToolbarButton)
|
||||
QtCore.QObject.connect(ToolbarButton,
|
||||
toolbarButton = QtGui.QAction(title, toolbarButton)
|
||||
self.addAction(toolbarButton)
|
||||
QtCore.QObject.connect(toolbarButton,
|
||||
QtCore.SIGNAL(u'triggered()'), slot)
|
||||
if tooltip:
|
||||
ToolbarButton.setToolTip(tooltip)
|
||||
toolbarButton.setToolTip(tooltip)
|
||||
if checkable:
|
||||
ToolbarButton.setCheckable(True)
|
||||
QtCore.QObject.connect(ToolbarButton,
|
||||
toolbarButton.setCheckable(True)
|
||||
QtCore.QObject.connect(toolbarButton,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), slot)
|
||||
self.actions[title] = ToolbarButton
|
||||
return ToolbarButton
|
||||
self.actions[title] = toolbarButton
|
||||
return toolbarButton
|
||||
|
||||
def addToolbarSeparator(self, handle):
|
||||
"""
|
||||
|
@ -250,19 +250,19 @@ class MainDisplay(DisplayWidget):
|
||||
self.scene.setSceneRect(0, 0, self.size().width(), self.size().height())
|
||||
self.webView.setGeometry(0, 0, self.size().width(), self.size().height())
|
||||
#Build a custom splash screen
|
||||
self.InitialFrame = QtGui.QImage(
|
||||
self.initialFrame = QtGui.QImage(
|
||||
self.screen[u'size'].width(),
|
||||
self.screen[u'size'].height(),
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
splash_image = QtGui.QImage(u':/graphics/openlp-splash-screen.png')
|
||||
painter_image = QtGui.QPainter()
|
||||
painter_image.begin(self.InitialFrame)
|
||||
painter_image.fillRect(self.InitialFrame.rect(), QtCore.Qt.white)
|
||||
painter_image.begin(self.initialFrame)
|
||||
painter_image.fillRect(self.initialFrame.rect(), QtCore.Qt.white)
|
||||
painter_image.drawImage(
|
||||
(self.screen[u'size'].width() - splash_image.width()) / 2,
|
||||
(self.screen[u'size'].height() - splash_image.height()) / 2,
|
||||
splash_image)
|
||||
self.displayImage(self.InitialFrame)
|
||||
self.displayImage(self.initialFrame)
|
||||
self.repaint()
|
||||
#Build a Black screen
|
||||
painter = QtGui.QPainter()
|
||||
|
Loading…
Reference in New Issue
Block a user