openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #18880
[Merge] lp:~marmyshev/openlp/bug-718797 into lp:openlp
Dmitriy Marmyshev has proposed merging lp:~marmyshev/openlp/bug-718797 into lp:openlp.
Requested reviews:
Andreas Preikschat (googol)
Raoul Snyman (raoul-snyman)
Tim Bentley (trb143)
Related bugs:
Bug #718797 in OpenLP: "RFE Separate blank buttons"
https://bugs.launchpad.net/openlp/+bug/718797
For more details, see:
https://code.launchpad.net/~marmyshev/openlp/bug-718797/+merge/144054
Auto separating blank buttons, if width allows this.
--
https://code.launchpad.net/~marmyshev/openlp/bug-718797/+merge/144054
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2013-01-16 19:37:11 +0000
+++ openlp/core/ui/slidecontroller.py 2013-01-21 06:07:20 +0000
@@ -98,6 +98,14 @@
u'audioPauseItem',
u'audioTimeLabel'
]
+ self.wideMenu = [
+ u'buttonBlankScreen',
+ u'buttonThemeScreen',
+ u'buttonDesktopScreen'
+ ]
+ self.hideMenuList = [
+ u'hideMenu'
+ ]
self.timer_id = 0
self.songEdit = False
self.selectedRow = 0
@@ -197,6 +205,19 @@
self.hideMenu.menu().addAction(self.blankScreen)
self.hideMenu.menu().addAction(self.themeScreen)
self.hideMenu.menu().addAction(self.desktopScreen)
+ # Wide menu of display control buttons.
+ self.buttonBlankScreen = QtGui.QToolButton(self.toolbar)
+ self.buttonBlankScreen.setObjectName(u'buttonBlankScreen')
+ self.toolbar.addToolbarWidget(self.buttonBlankScreen)
+ self.buttonBlankScreen.setDefaultAction(self.blankScreen)
+ self.buttonThemeScreen = QtGui.QToolButton(self.toolbar)
+ self.buttonThemeScreen.setObjectName(u'buttonThemeScreen')
+ self.toolbar.addToolbarWidget(self.buttonThemeScreen)
+ self.buttonThemeScreen.setDefaultAction(self.themeScreen)
+ self.buttonDesktopScreen = QtGui.QToolButton(self.toolbar)
+ self.buttonDesktopScreen.setObjectName(u'buttonDesktopScreen')
+ self.toolbar.addToolbarWidget(self.buttonDesktopScreen)
+ self.buttonDesktopScreen.setDefaultAction(self.desktopScreen)
self.toolbar.addToolbarAction(u'loopSeparator', separator=True)
# Play Slides Menu
self.playSlidesMenu = QtGui.QToolButton(self.toolbar)
@@ -349,6 +370,7 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_toggle_display'), self.toggleDisplay)
self.toolbar.setWidgetVisible(self.loopList, False)
+ self.toolbar.setWidgetVisible(self.wideMenu, False)
else:
QtCore.QObject.connect(self.previewListWidget,
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onGoLiveClick)
@@ -568,7 +590,20 @@
width = self.parent().controlSplitter.sizes()[self.split]
for framenumber in range(len(self.serviceItem.get_frames())):
self.previewListWidget.setRowHeight(framenumber, width / self.ratio)
+ self.onControllerSizeChanged(self.controller.width(), self.controller.height())
+ def onControllerSizeChanged(self, width, height):
+ """
+ Change layout of display control buttons on controller size change
+ """
+ if self.isLive:
+ if width > 300 and self.hideMenu.isVisible():
+ self.toolbar.setWidgetVisible(self.hideMenuList, False)
+ self.toolbar.setWidgetVisible(self.wideMenu)
+ elif width < 300 and not self.hideMenu.isVisible():
+ self.toolbar.setWidgetVisible(self.wideMenu, False)
+ self.toolbar.setWidgetVisible(self.hideMenuList)
+
def onSongBarHandler(self):
request = self.sender().text()
slide_no = self.slideList[request]
Follow ups