← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~suutari-olli/openlp/show-no-logo-or-background-when-starting into lp:openlp

 

Azaziah has proposed merging lp:~suutari-olli/openlp/show-no-logo-or-background-when-starting into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~suutari-olli/openlp/show-no-logo-or-background-when-starting/+merge/289111

Added: "Do not show anything on startup" as an option for 
disabling default image and background. 

(By default OpenLP logo and white bg color are shown on primary Live monitor
At the moment it's only possible to change the color/image but not disable them.)

--------------------------------
lp:~suutari-olli/openlp/test-15-3-16 (revision 2627)
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-01-Pull/1324/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-02-Functional-Tests/1246/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-03-Interface-Tests/1185/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1020/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/611/
[←[1;31mFAILURE←[1;m] https://ci.openlp.io/job/Branch-05a-Code_Analysis/678/
Stopping after failure < Do note that this is due to errors in trunk, tgc has a branch for this.
-- 
Your team OpenLP Core is requested to review the proposed merge of lp:~suutari-olli/openlp/show-no-logo-or-background-when-starting into lp:openlp.
=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py	2016-02-02 21:55:37 +0000
+++ openlp/core/common/settings.py	2016-03-15 21:04:34 +0000
@@ -121,6 +121,7 @@
         'advanced/double click live': False,
         'advanced/enable exit confirmation': True,
         'advanced/expand service item': False,
+        'advanced/show nothing default': False,
         'advanced/hide mouse': True,
         'advanced/is portable': False,
         'advanced/max recent files': 20,

=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py	2015-12-31 22:46:06 +0000
+++ openlp/core/ui/advancedtab.py	2016-03-15 21:04:34 +0000
@@ -196,6 +196,9 @@
         self.default_file_layout.addWidget(self.default_browse_button)
         self.default_file_layout.addWidget(self.default_revert_button)
         self.default_image_layout.addRow(self.default_file_label, self.default_file_layout)
+        self.default_show_nothing_check_box = QtWidgets.QCheckBox(self.ui_group_box)
+        self.default_show_nothing_check_box.setObjectName('default_default_show_nothing_check_box')
+        self.default_image_layout.addRow(self.default_show_nothing_check_box)
         self.right_layout.addWidget(self.default_image_group_box)
         # Hide mouse
         self.hide_mouse_group_box = QtWidgets.QGroupBox(self.right_column)
@@ -299,6 +302,7 @@
         self.default_file_label.setText(translate('OpenLP.AdvancedTab', 'Image file:'))
         self.default_browse_button.setToolTip(translate('OpenLP.AdvancedTab', 'Browse for an image file to display.'))
         self.default_revert_button.setToolTip(translate('OpenLP.AdvancedTab', 'Revert to the default OpenLP logo.'))
+        self.default_show_nothing_check_box.setText(translate('OpenLP.AdvancedTab', 'Do not show anything on startup'))
         self.data_directory_current_label.setText(translate('OpenLP.AdvancedTab', 'Current path:'))
         self.data_directory_new_label.setText(translate('OpenLP.AdvancedTab', 'Custom path:'))
         self.data_directory_browse_button.setToolTip(translate('OpenLP.AdvancedTab',
@@ -353,6 +357,7 @@
         self.x11_bypass_check_box.setChecked(settings.value('x11 bypass wm'))
         self.default_color = settings.value('default color')
         self.default_file_edit.setText(settings.value('default image'))
+        self.default_show_nothing_check_box.setChecked(settings.value('show nothing default'))
         self.slide_limits = settings.value('slide limits')
         self.is_search_as_you_type_enabled = settings.value('search as type')
         self.search_as_type_check_box.setChecked(self.is_search_as_you_type_enabled)
@@ -426,6 +431,7 @@
         settings.setValue('alternate rows', self.alternate_rows_check_box.isChecked())
         settings.setValue('default color', self.default_color)
         settings.setValue('default image', self.default_file_edit.text())
+        settings.setValue('show nothing default', self.default_show_nothing_check_box.isChecked())
         settings.setValue('slide limits', self.slide_limits)
         if self.x11_bypass_check_box.isChecked() != settings.value('x11 bypass wm'):
             settings.setValue('x11 bypass wm', self.x11_bypass_check_box.isChecked())

=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2016-02-20 21:42:31 +0000
+++ openlp/core/ui/maindisplay.py	2016-03-15 21:04:34 +0000
@@ -252,29 +252,34 @@
         self.setVisible(False)
         Display.setup(self)
         if self.is_live:
-            # Build the initial frame.
-            background_color = QtGui.QColor()
-            background_color.setNamedColor(Settings().value('advanced/default color'))
-            if not background_color.isValid():
-                background_color = QtCore.Qt.white
-            image_file = Settings().value('advanced/default image')
-            splash_image = QtGui.QImage(image_file)
-            self.initial_fame = QtGui.QImage(
-                self.screen['size'].width(),
-                self.screen['size'].height(),
-                QtGui.QImage.Format_ARGB32_Premultiplied)
-            painter_image = QtGui.QPainter()
-            painter_image.begin(self.initial_fame)
-            painter_image.fillRect(self.initial_fame.rect(), background_color)
-            painter_image.drawImage(
-                (self.screen['size'].width() - splash_image.width()) // 2,
-                (self.screen['size'].height() - splash_image.height()) // 2,
-                splash_image)
-            service_item = ServiceItem()
-            service_item.bg_image_bytes = image_to_byte(self.initial_fame)
-            self.web_view.setHtml(build_html(service_item, self.screen, self.is_live, None,
-                                  plugins=self.plugin_manager.plugins))
-            self._hide_mouse()
+            # If "Show no Logo or Image on startup" is enabled, display transparent background instead.
+            if Settings().value('advanced/show nothing default'):
+                self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
+                self.setStyleSheet(TRANSPARENT_STYLESHEET)
+            else:
+                # Build the initial frame.
+                background_color = QtGui.QColor()
+                background_color.setNamedColor(Settings().value('advanced/default color'))
+                if not background_color.isValid():
+                    background_color = QtCore.Qt.white
+                image_file = Settings().value('advanced/default image')
+                splash_image = QtGui.QImage(image_file)
+                self.initial_fame = QtGui.QImage(
+                    self.screen['size'].width(),
+                    self.screen['size'].height(),
+                    QtGui.QImage.Format_ARGB32_Premultiplied)
+                painter_image = QtGui.QPainter()
+                painter_image.begin(self.initial_fame)
+                painter_image.fillRect(self.initial_fame.rect(), background_color)
+                painter_image.drawImage(
+                    (self.screen['size'].width() - splash_image.width()) // 2,
+                    (self.screen['size'].height() - splash_image.height()) // 2,
+                    splash_image)
+                service_item = ServiceItem()
+                service_item.bg_image_bytes = image_to_byte(self.initial_fame)
+                self.web_view.setHtml(build_html(service_item, self.screen, self.is_live, None,
+                                      plugins=self.plugin_manager.plugins))
+                self._hide_mouse()
 
     def text(self, slide, animate=True):
         """


Follow ups