From 9e6ffe5d43856cd7ea36510f37f1b80b7df8e173 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 1 Mar 2017 16:26:58 -0700 Subject: [PATCH] Make the settings dialog as small as possible Fixes: https://launchpad.net/bugs/1668669 --- openlp/core/ui/settingsdialog.py | 2 +- tests/functional/openlp_core_ui/test_settingsform.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/settingsdialog.py b/openlp/core/ui/settingsdialog.py index d6d61f45c..15c610811 100644 --- a/openlp/core/ui/settingsdialog.py +++ b/openlp/core/ui/settingsdialog.py @@ -39,7 +39,7 @@ class Ui_SettingsDialog(object): """ settings_dialog.setObjectName('settings_dialog') settings_dialog.setWindowIcon(build_icon(u':/icon/openlp-logo.svg')) - settings_dialog.resize(800, 700) + settings_dialog.resize(920, 625) self.dialog_layout = QtWidgets.QGridLayout(settings_dialog) self.dialog_layout.setObjectName('dialog_layout') self.dialog_layout.setContentsMargins(8, 8, 8, 8) diff --git a/tests/functional/openlp_core_ui/test_settingsform.py b/tests/functional/openlp_core_ui/test_settingsform.py index 32b51c4bf..7ab240b6d 100644 --- a/tests/functional/openlp_core_ui/test_settingsform.py +++ b/tests/functional/openlp_core_ui/test_settingsform.py @@ -151,3 +151,14 @@ class TestSettingsForm(TestCase): # THEN: The general tab's cancel() method should have been called, but not the themes tab mocked_general_cancel.assert_called_with() self.assertEqual(0, mocked_theme_cancel.call_count, 'The Themes tab\'s cancel() should not have been called') + + def test_register_post_process(self): + # GIVEN: A settings form instance + settings_form = SettingsForm(None) + fake_function = MagicMock() + + # WHEN: register_post_process() is called + settings_form.register_post_process(fake_function) + + # THEN: The fake function should be in the settings form's list + assert fake_function in settings_form.processes