diff --git a/openlp.pyw b/openlp.pyw index 98faf8b03..ebd449bf8 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -47,7 +47,15 @@ QMainWindow::separator QDockWidget::title { border: none; - padding-left: 2px; + padding-left: 5px; + padding-top: 3px; +} + +QToolBar +{ + border: none; + margin: 0; + padding: 0; } """ diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 572d96ade..4f6aa9235 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -169,6 +169,8 @@ class Renderer(object): page_length = int(self._rect.height() / metrics.height() - 2 ) - 1 ave_line_width = line_width / metrics.averageCharWidth() ave_line_width = int(ave_line_width + (ave_line_width * 1)) + log.debug(u'Page Length area height %s , metrics %s , lines %s' % + (int(self._rect.height()), metrics.height(), page_length )) split_pages = [] page = [] split_lines = [] @@ -195,11 +197,17 @@ class Renderer(object): else: split_text = line[:pos] split_lines.append(split_text) - line = line[pos:] + line = line[pos:].lstrip() + #if we have more text add up to 10 spaces on the front. + if len(line) > 0 and self._theme.font_main_indentation > 0: + line = u'%s%s' % \ + (u' '[:self._theme.font_main_indentation], line) #Text fits in a line now - for line in split_lines: + for count, line in enumerate(split_lines): page.append(line) - if len(page) == page_length: + #last but one line and only 2 lines to go or end of page + if (len(page) == page_length - 1 and len(split_lines) - 3 == count) or \ + len(page) == page_length: split_pages.append(page) page = [] if len(page) > 0 and page != u' ': diff --git a/openlp/core/lib/themexmlhandler.py b/openlp/core/lib/themexmlhandler.py index 10f2d857a..7aab3bf7a 100644 --- a/openlp/core/lib/themexmlhandler.py +++ b/openlp/core/lib/themexmlhandler.py @@ -51,7 +51,8 @@ blankthemexml=\ 30 Normal False - + 0 + Arial @@ -59,7 +60,8 @@ blankthemexml=\ 12 Normal False - + 0 + True @@ -167,7 +169,7 @@ class ThemeXML(object): self.child_element(background, u'filename', filename) def add_font(self, name, color, proportion, override, fonttype=u'main', - weight=u'Normal', italics=u'False', xpos=0, ypos=0, width=0, height=0): + weight=u'Normal', italics=u'False', indentation=0, xpos=0, ypos=0, width=0, height=0): """ Add a Font. @@ -192,6 +194,9 @@ class ThemeXML(object): ``italics`` Does the font render to italics Defaults to 0 Normal + ``indentation`` + Number of characters the wrap line is indented + ``xpos`` The X position of the text block. @@ -217,6 +222,9 @@ class ThemeXML(object): self.child_element(background, u'weight', weight) #Create italics name element self.child_element(background, u'italics', italics) + #Create indentation name element + self.child_element(background, u'indentation', unicode(indentation)) + #Create Location element element = self.theme_xml.createElement(u'location') element.setAttribute(u'override',override) diff --git a/openlp/core/ui/amendthemedialog.py b/openlp/core/ui/amendthemedialog.py index 63ffea5d8..4b99b6969 100644 --- a/openlp/core/ui/amendthemedialog.py +++ b/openlp/core/ui/amendthemedialog.py @@ -177,6 +177,16 @@ class Ui_AmendThemeDialog(object): self.FontMainWeightLabel.setObjectName("FontMainWeightLabel") self.MainFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontMainWeightLabel) self.MainLeftLayout.addWidget(self.FontMainGroupBox) + self.FontMainWrapIndentationLabel = QtGui.QLabel(self.FontMainGroupBox) + self.FontMainWrapIndentationLabel.setObjectName("FontMainWrapIndentationLabel") + self.MainFontLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontMainWrapIndentationLabel) + self.FontMainLineSpacingSpinBox = QtGui.QSpinBox(self.FontMainGroupBox) + self.FontMainLineSpacingSpinBox.setObjectName("FontMainLineSpacingSpinBox") + self.FontMainLineSpacingSpinBox.setMaximum(10) + self.MainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontMainLineSpacingSpinBox) + self.FontMainLinesPageLabel = QtGui.QLabel(self.FontMainGroupBox) + self.FontMainLinesPageLabel.setObjectName("FontMainLinesPageLabel") + self.MainFontLayout.setWidget(5, QtGui.QFormLayout.LabelRole, self.FontMainLinesPageLabel) spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.MainLeftLayout.addItem(spacerItem1) self.FontMainLayout.addWidget(self.MainLeftWidget) @@ -528,7 +538,9 @@ class Ui_AmendThemeDialog(object): AmendThemeDialog.setTabOrder(self.GradientComboBox, self.FontMainComboBox) AmendThemeDialog.setTabOrder(self.FontMainComboBox, self.FontMainColorPushButton) AmendThemeDialog.setTabOrder(self.FontMainColorPushButton, self.FontMainSizeSpinBox) - AmendThemeDialog.setTabOrder(self.FontMainSizeSpinBox, self.FontMainDefaultCheckBox) + AmendThemeDialog.setTabOrder(self.FontMainSizeSpinBox, self.FontMainWeightComboBox) + AmendThemeDialog.setTabOrder(self.FontMainWeightComboBox, self.FontMainLineSpacingSpinBox) + AmendThemeDialog.setTabOrder(self.FontMainLineSpacingSpinBox, self.FontMainDefaultCheckBox) AmendThemeDialog.setTabOrder(self.FontMainDefaultCheckBox, self.FontMainXSpinBox) AmendThemeDialog.setTabOrder(self.FontMainXSpinBox, self.FontMainYSpinBox) AmendThemeDialog.setTabOrder(self.FontMainYSpinBox, self.FontMainWidthSpinBox) @@ -536,7 +548,8 @@ class Ui_AmendThemeDialog(object): AmendThemeDialog.setTabOrder(self.FontMainHeightSpinBox, self.FontFooterComboBox) AmendThemeDialog.setTabOrder(self.FontFooterComboBox, self.FontFooterColorPushButton) AmendThemeDialog.setTabOrder(self.FontFooterColorPushButton, self.FontFooterSizeSpinBox) - AmendThemeDialog.setTabOrder(self.FontFooterSizeSpinBox, self.FontFooterDefaultCheckBox) + AmendThemeDialog.setTabOrder(self.FontFooterSizeSpinBox, self.FontFooterWeightComboBox) + AmendThemeDialog.setTabOrder(self.FontFooterWeightComboBox, self.FontFooterDefaultCheckBox) AmendThemeDialog.setTabOrder(self.FontFooterDefaultCheckBox, self.FontFooterXSpinBox) AmendThemeDialog.setTabOrder(self.FontFooterXSpinBox, self.FontFooterYSpinBox) AmendThemeDialog.setTabOrder(self.FontFooterYSpinBox, self.FontFooterWidthSpinBox) @@ -571,10 +584,11 @@ class Ui_AmendThemeDialog(object): self.FontMainColorLabel.setText(translate(u'AmendThemeDialog', u'Font Color:')) self.FontMainSize.setText(translate(u'AmendThemeDialog', u'Size:')) self.FontMainSizeSpinBox.setSuffix(translate(u'AmendThemeDialog', u'pt')) - self.FontMainWeightComboBox.setItemText(0, translate("AmendThemeDialog", u'Normal')) - self.FontMainWeightComboBox.setItemText(1, translate("AmendThemeDialog", u'Bold')) - self.FontMainWeightComboBox.setItemText(2, translate("AmendThemeDialog", u'Italics')) - self.FontMainWeightComboBox.setItemText(3, translate("AmendThemeDialog", u'Bold/Italics')) + self.FontMainWrapIndentationLabel.setText(translate(u'AmendThemeDialog', u'Wrap Indentation')) + self.FontMainWeightComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Normal')) + self.FontMainWeightComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Bold')) + self.FontMainWeightComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Italics')) + self.FontMainWeightComboBox.setItemText(3, translate(u'AmendThemeDialog', u'Bold/Italics')) self.FontMainWeightLabel.setText(translate("AmendThemeDialog", u'Font Weight:')) self.MainLocationGroupBox.setTitle(translate(u'AmendThemeDialog', u'Display Location')) self.DefaultLocationLabel.setText(translate(u'AmendThemeDialog', u'Use Default Location:')) diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py index 8ff978b68..d2afd2fcb 100644 --- a/openlp/core/ui/amendthemeform.py +++ b/openlp/core/ui/amendthemeform.py @@ -100,6 +100,9 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): QtCore.QObject.connect(self.FontMainHeightSpinBox, QtCore.SIGNAL(u'editingFinished()'), self.onFontMainHeightSpinBoxChanged) + QtCore.QObject.connect(self.FontMainLineSpacingSpinBox, + QtCore.SIGNAL(u'editingFinished()'), + self.onFontMainLineSpacingSpinBoxChanged) QtCore.QObject.connect(self.FontFooterDefaultCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), self.onFontFooterDefaultCheckBoxChanged) @@ -150,6 +153,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): unicode(self.theme.font_main_override), u'main', unicode(self.theme.font_main_weight), unicode(self.theme.font_main_italics), + unicode(self.theme.font_main_indentation), unicode(self.theme.font_main_x), unicode(self.theme.font_main_y), unicode(self.theme.font_main_width), @@ -160,6 +164,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): unicode(self.theme.font_footer_override), u'footer', unicode(self.theme.font_footer_weight), unicode(self.theme.font_footer_italics), + 0, unicode(self.theme.font_footer_x), unicode(self.theme.font_footer_y), unicode(self.theme.font_footer_width), @@ -187,6 +192,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.theme.parse(xml) self.theme.extend_image_filename(self.path) self.thememanager.cleanTheme(self.theme) + # Stop the initial screen setup generating 1 preview per field! self.allowPreview = False self.paintUi(self.theme) self.allowPreview = True @@ -252,6 +258,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.FontMainWidthSpinBox.setValue(int(self.theme.font_main_width)) self.FontMainHeightSpinBox.setValue(int( \ self.theme.font_main_height)) + self.FontMainLineSpacingSpinBox.setValue(int( \ + self.theme.font_main_indentation)) self.stateChanging(self.theme) self.previewTheme(self.theme) @@ -270,6 +278,11 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.theme.font_main_width = self.FontMainWidthSpinBox.value() self.previewTheme(self.theme) + def onFontMainLineSpacingSpinBoxChanged(self): + if self.theme.font_main_indentation != self.FontMainLineSpacingSpinBox.value(): + self.theme.font_main_indentation = self.FontMainLineSpacingSpinBox.value() + self.previewTheme(self.theme) + def onFontMainHeightSpinBoxChanged(self): if self.theme.font_main_height != self.FontMainHeightSpinBox.value(): self.theme.font_main_height = self.FontMainHeightSpinBox.value() @@ -498,7 +511,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.FontMainWeightComboBox.setCurrentIndex(2) else: self.FontMainWeightComboBox.setCurrentIndex(3) - + self.FontMainLineSpacingSpinBox.setValue(int(self.theme.font_main_indentation)) self.FontMainXSpinBox.setValue(int(self.theme.font_main_x)) self.FontMainYSpinBox.setValue(int(self.theme.font_main_y)) self.FontMainWidthSpinBox.setValue(int(self.theme.font_main_width)) @@ -653,5 +666,20 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): def previewTheme(self, theme): if self.allowPreview: + #calculate main number of rows + main_weight = 50 + if self.theme.font_main_weight == u'Bold': + main_weight = 75 + mainFont = QtGui.QFont(self.theme.font_main_name, + int(self.theme.font_main_proportion), # size + int(main_weight), # weight + self.theme.font_main_italics)# italic + mainFont.setPixelSize(int(self.theme.font_main_proportion)) + metrics = QtGui.QFontMetrics(mainFont) + page_length = (int(self.FontMainHeightSpinBox.value()) / metrics.height() - 2 ) - 1 + log.debug(u'Page Length area height %s , metrics %s , lines %s' % + (int(self.FontMainHeightSpinBox.value()), metrics.height(), page_length )) + self.FontMainLinesPageLabel.setText( + translate(u'ThemeManager', u'Slide Height is %s rows' % page_length )) frame = self.thememanager.generateImage(theme) self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame)) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 601cab59a..00d0f982a 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -38,7 +38,7 @@ from openlp.core.utils import check_latest_version media_manager_style = """ QToolBox::tab { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 palette(midlight), stop: 1.0 palette(dark)); + stop: 0 palette(midlight), stop: 1.0 palette(mid)); border-width: 1px; border-style: outset; border-color: palette(midlight); @@ -46,7 +46,7 @@ media_manager_style = """ } QToolBox::tab:selected { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 palette(light), stop: 1.0 palette(dark)); + stop: 0 palette(light), stop: 1.0 palette(mid)); border-color: palette(light); } """ diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index e18e1b8cc..4f7163ba0 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -28,6 +28,14 @@ import time from PyQt4 import QtCore, QtGui from openlp.core.lib import OpenLPToolbar, translate, Receiver, ServiceType +label_stylesheet = u""" +QTableWidget::item:selected +{ + background-color: %s; +} +""" + + class SlideList(QtGui.QTableWidget): """ Customised version of QTableWidget which can respond to keyboard @@ -36,6 +44,12 @@ class SlideList(QtGui.QTableWidget): def __init__(self, parent=None, name=None): QtGui.QTableWidget.__init__(self, parent.Controller) self.parent = parent + text_color = QtGui.QApplication.palette().color(QtGui.QPalette.Base) + if text_color.value() > 128: + text_color = text_color.darker(120).name() + else: + text_color = text_color.lighter(120).name() + self.setStyleSheet(label_stylesheet % text_color) def keyPressEvent(self, event): if type(event) == QtGui.QKeyEvent: @@ -303,18 +317,20 @@ class SlideController(QtGui.QWidget): self.PreviewListWidget.rowCount() + 1) item = QtGui.QTableWidgetItem() label = QtGui.QLabel() - label.setMargin(8) + label.setMargin(4) #It is a Image if frame[u'text'] is None: pixmap = self.parent.RenderManager.resize_image(frame[u'image']) label.setScaledContents(True) label.setPixmap(QtGui.QPixmap.fromImage(pixmap)) + slide_height = self.settingsmanager.slidecontroller_image * \ + self.parent.RenderManager.screen_ratio else: label.setText(frame[u'text']) + label.setAlignment(QtCore.Qt.AlignHCenter) + slide_height = label.sizeHint().height() self.PreviewListWidget.setCellWidget(framenumber, 0, label) self.PreviewListWidget.setItem(framenumber, 0, item) - slide_height = self.settingsmanager.slidecontroller_image * \ - self.parent.RenderManager.screen_ratio self.PreviewListWidget.setRowHeight(framenumber, slide_height) self.PreviewListWidget.setColumnWidth( 0, self.PreviewListWidget.viewport().size().width()) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 50e433534..84f88c726 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -510,6 +510,7 @@ class ThemeManager(QtGui.QWidget): theme.font_main_color = theme.font_main_color.strip() theme.font_main_height = theme.font_main_height.strip() theme.font_main_italics = str_to_bool(theme.font_main_italics) + theme.font_main_indentation = int(theme.font_main_indentation) theme.font_main_name = theme.font_main_name.strip() #theme.font_main_override theme.font_main_proportion = theme.font_main_proportion.strip() diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 3dae3d87c..548928397 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -77,113 +77,135 @@ class BibleMediaItem(MediaManagerItem): # Add the Quick Search tab self.QuickTab = QtGui.QWidget() self.QuickTab.setObjectName(u'QuickTab') - self.QuickVerticalLayout = QtGui.QVBoxLayout(self.QuickTab) - self.QuickVerticalLayout.setObjectName("verticalLayout") - self.QuickLayout = QtGui.QGridLayout() - self.QuickLayout.setMargin(0) + self.QuickLayout = QtGui.QGridLayout(self.QuickTab) + self.QuickLayout.setMargin(2) self.QuickLayout.setSpacing(4) + self.QuickLayout.setVerticalSpacing(4) self.QuickLayout.setObjectName(u'QuickLayout') self.QuickVersionLabel = QtGui.QLabel(self.QuickTab) self.QuickVersionLabel.setObjectName(u'QuickVersionLabel') self.QuickLayout.addWidget(self.QuickVersionLabel, 0, 0, 1, 1) self.QuickVersionComboBox = QtGui.QComboBox(self.QuickTab) + self.QuickVersionComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) self.QuickVersionComboBox.setObjectName(u'VersionComboBox') self.QuickLayout.addWidget(self.QuickVersionComboBox, 0, 1, 1, 2) - self.QuickSearchLabel = QtGui.QLabel(self.QuickTab) - self.QuickSearchLabel.setObjectName(u'QuickSearchLabel') - self.QuickLayout.addWidget(self.QuickSearchLabel, 1, 0, 1, 1) - self.QuickSearchComboBox = QtGui.QComboBox(self.QuickTab) - self.QuickSearchComboBox.setObjectName(u'SearchComboBox') - self.QuickLayout.addWidget(self.QuickSearchComboBox, 1, 1, 1, 2) + self.QuickSecondVersionLabel = QtGui.QLabel(self.QuickTab) + self.QuickSecondVersionLabel.setObjectName(u'QuickSecondVersionLabel') + self.QuickLayout.addWidget(self.QuickSecondVersionLabel, 1, 0, 1, 1) + self.QuickSecondBibleComboBox = QtGui.QComboBox(self.QuickTab) + self.QuickSecondBibleComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) + self.QuickSecondBibleComboBox.setObjectName(u'SecondBible') + self.QuickLayout.addWidget(self.QuickSecondBibleComboBox, 1, 1, 1, 2) self.QuickSearchLabel = QtGui.QLabel(self.QuickTab) self.QuickSearchLabel.setObjectName(u'QuickSearchLabel') self.QuickLayout.addWidget(self.QuickSearchLabel, 2, 0, 1, 1) + self.QuickSearchComboBox = QtGui.QComboBox(self.QuickTab) + self.QuickSearchComboBox.setObjectName(u'SearchComboBox') + self.QuickLayout.addWidget(self.QuickSearchComboBox, 2, 1, 1, 2) + self.QuickSearchLabel = QtGui.QLabel(self.QuickTab) + self.QuickSearchLabel.setObjectName(u'QuickSearchLabel') + self.QuickLayout.addWidget(self.QuickSearchLabel, 3, 0, 1, 1) self.QuickSearchEdit = QtGui.QLineEdit(self.QuickTab) self.QuickSearchEdit.setObjectName(u'QuickSearchEdit') - self.QuickLayout.addWidget(self.QuickSearchEdit, 2, 1, 1, 2) - self.QuickSearchButton = QtGui.QPushButton(self.QuickTab) - self.QuickSearchButton.setObjectName(u'QuickSearchButton') - self.QuickLayout.addWidget(self.QuickSearchButton, 3, 2, 1, 1) + self.QuickLayout.addWidget(self.QuickSearchEdit, 3, 1, 1, 2) self.QuickClearLabel = QtGui.QLabel(self.QuickTab) self.QuickClearLabel.setObjectName(u'QuickSearchLabel') - self.QuickLayout.addWidget(self.QuickClearLabel, 3, 0, 1, 1) + self.QuickLayout.addWidget(self.QuickClearLabel, 4, 0, 1, 1) self.ClearQuickSearchComboBox = QtGui.QComboBox(self.QuickTab) self.ClearQuickSearchComboBox.setObjectName(u'ClearQuickSearchComboBox') - self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 3, 1, 1, 1) - self.QuickVerticalLayout.addLayout(self.QuickLayout) - self.QuickSecondBibleComboBox = QtGui.QComboBox(self.QuickTab) - self.QuickSecondBibleComboBox.setObjectName(u'SecondBible') - self.QuickVerticalLayout.addWidget(self.QuickSecondBibleComboBox) + self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 4, 1, 1, 2) + self.QuickSearchButtonLayout = QtGui.QHBoxLayout() + self.QuickSearchButtonLayout.setMargin(0) + self.QuickSearchButtonLayout.setSpacing(0) + self.QuickSearchButtonLayout.setObjectName(u'QuickSearchButtonLayout') + self.QuickSearchButtonSpacer = QtGui.QSpacerItem(40, 20, + QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.QuickSearchButtonLayout.addItem(self.QuickSearchButtonSpacer) + self.QuickSearchButton = QtGui.QPushButton(self.QuickTab) + self.QuickSearchButton.setObjectName(u'QuickSearchButton') + self.QuickSearchButtonLayout.addWidget(self.QuickSearchButton) + self.QuickLayout.addLayout(self.QuickSearchButtonLayout, 5, 0, 1, 3) self.QuickMessage = QtGui.QLabel(self.QuickTab) self.QuickMessage.setObjectName(u'QuickMessage') - self.QuickVerticalLayout.addWidget(self.QuickMessage) + self.QuickLayout.addWidget(self.QuickMessage, 6, 0, 1, 3) self.SearchTabWidget.addTab(self.QuickTab, 'Quick') QuickSpacerItem = QtGui.QSpacerItem(20, 35, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.QuickLayout.addItem(QuickSpacerItem, 4, 2, 1, 1) + self.QuickLayout.addItem(QuickSpacerItem, 6, 2, 1, 1) # Add the Advanced Search tab self.AdvancedTab = QtGui.QWidget() self.AdvancedTab.setObjectName(u'AdvancedTab') - self.AdvancedVerticalLayout = QtGui.QVBoxLayout(self.AdvancedTab) - self.AdvancedVerticalLayout.setObjectName("verticalLayout") - self.AdvancedLayout = QtGui.QGridLayout() - self.AdvancedLayout.setMargin(0) + self.AdvancedLayout = QtGui.QGridLayout(self.AdvancedTab) + self.AdvancedLayout.setMargin(2) self.AdvancedLayout.setSpacing(4) + self.AdvancedLayout.setVerticalSpacing(4) self.AdvancedLayout.setObjectName(u'AdvancedLayout') self.AdvancedVersionLabel = QtGui.QLabel(self.AdvancedTab) self.AdvancedVersionLabel.setObjectName(u'AdvancedVersionLabel') self.AdvancedLayout.addWidget(self.AdvancedVersionLabel, 0, 0, 1, 1) self.AdvancedVersionComboBox = QtGui.QComboBox(self.AdvancedTab) + self.AdvancedVersionComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) self.AdvancedVersionComboBox.setObjectName(u'AdvancedVersionComboBox') - self.AdvancedLayout.addWidget(self.AdvancedVersionComboBox, 0, 2, 1, 2) + self.AdvancedLayout.addWidget(self.AdvancedVersionComboBox, 0, 1, 1, 2) + self.AdvancedSecondBibleLabel = QtGui.QLabel(self.AdvancedTab) + self.AdvancedSecondBibleLabel.setObjectName(u'AdvancedSecondBibleLabel') + self.AdvancedLayout.addWidget(self.AdvancedSecondBibleLabel, 1, 0, 1, 1) + self.AdvancedSecondBibleComboBox = QtGui.QComboBox(self.AdvancedTab) + self.AdvancedSecondBibleComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) + self.AdvancedSecondBibleComboBox.setObjectName(u'AdvancedSecondBibleComboBox') + self.AdvancedLayout.addWidget(self.AdvancedSecondBibleComboBox, 1, 1, 1, 2) self.AdvancedBookLabel = QtGui.QLabel(self.AdvancedTab) self.AdvancedBookLabel.setObjectName(u'AdvancedBookLabel') - self.AdvancedLayout.addWidget(self.AdvancedBookLabel, 1, 0, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedBookLabel, 2, 0, 1, 1) self.AdvancedBookComboBox = QtGui.QComboBox(self.AdvancedTab) self.AdvancedBookComboBox.setObjectName(u'AdvancedBookComboBox') - self.AdvancedLayout.addWidget(self.AdvancedBookComboBox, 1, 2, 1, 2) + self.AdvancedLayout.addWidget(self.AdvancedBookComboBox, 2, 1, 1, 2) self.AdvancedChapterLabel = QtGui.QLabel(self.AdvancedTab) self.AdvancedChapterLabel.setObjectName(u'AdvancedChapterLabel') - self.AdvancedLayout.addWidget(self.AdvancedChapterLabel, 2, 2, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedChapterLabel, 3, 1, 1, 1) self.AdvancedVerseLabel = QtGui.QLabel(self.AdvancedTab) self.AdvancedVerseLabel.setObjectName(u'AdvancedVerseLabel') - self.AdvancedLayout.addWidget(self.AdvancedVerseLabel, 2, 3, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedVerseLabel, 3, 2, 1, 1) self.AdvancedFromLabel = QtGui.QLabel(self.AdvancedTab) self.AdvancedFromLabel.setObjectName(u'AdvancedFromLabel') - self.AdvancedLayout.addWidget(self.AdvancedFromLabel, 3, 0, 1, 1) - self.AdvancedToLabel = QtGui.QLabel(self.AdvancedTab) - self.AdvancedToLabel.setObjectName(u'AdvancedToLabel') - self.AdvancedLayout.addWidget(self.AdvancedToLabel, 4, 0, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedFromLabel, 4, 0, 1, 1) self.AdvancedFromChapter = QtGui.QComboBox(self.AdvancedTab) self.AdvancedFromChapter.setObjectName(u'AdvancedFromChapter') - self.AdvancedLayout.addWidget(self.AdvancedFromChapter, 3, 2, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedFromChapter, 4, 1, 1, 1) self.AdvancedFromVerse = QtGui.QComboBox(self.AdvancedTab) self.AdvancedFromVerse.setObjectName(u'AdvancedFromVerse') - self.AdvancedLayout.addWidget(self.AdvancedFromVerse, 3, 3, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedFromVerse, 4, 2, 1, 1) + self.AdvancedToLabel = QtGui.QLabel(self.AdvancedTab) + self.AdvancedToLabel.setObjectName(u'AdvancedToLabel') + self.AdvancedLayout.addWidget(self.AdvancedToLabel, 5, 0, 1, 1) self.AdvancedToChapter = QtGui.QComboBox(self.AdvancedTab) self.AdvancedToChapter.setObjectName(u'AdvancedToChapter') - self.AdvancedLayout.addWidget(self.AdvancedToChapter, 4, 2, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedToChapter, 5, 1, 1, 1) self.AdvancedToVerse = QtGui.QComboBox(self.AdvancedTab) self.AdvancedToVerse.setObjectName(u'AdvancedToVerse') - self.AdvancedLayout.addWidget(self.AdvancedToVerse, 4, 3, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedToVerse, 5, 2, 1, 1) self.AdvancedClearLabel = QtGui.QLabel(self.QuickTab) self.AdvancedClearLabel.setObjectName(u'QuickSearchLabel') - self.AdvancedLayout.addWidget(self.AdvancedClearLabel, 5, 0, 1, 1) + self.AdvancedLayout.addWidget(self.AdvancedClearLabel, 6, 0, 1, 1) self.ClearAdvancedSearchComboBox = QtGui.QComboBox(self.QuickTab) self.ClearAdvancedSearchComboBox.setObjectName( u'ClearAdvancedSearchComboBox') self.AdvancedLayout.addWidget( - self.ClearAdvancedSearchComboBox, 5, 2, 1, 2) + self.ClearAdvancedSearchComboBox, 6, 1, 1, 2) + self.AdvancedSearchButtonLayout = QtGui.QHBoxLayout() + self.AdvancedSearchButtonLayout.setMargin(0) + self.AdvancedSearchButtonLayout.setSpacing(0) + self.AdvancedSearchButtonLayout.setObjectName(u'AdvancedSearchButtonLayout') + self.AdvancedSearchButtonSpacer = QtGui.QSpacerItem(40, 20, + QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.AdvancedSearchButtonLayout.addItem(self.AdvancedSearchButtonSpacer) self.AdvancedSearchButton = QtGui.QPushButton(self.AdvancedTab) self.AdvancedSearchButton.setObjectName(u'AdvancedSearchButton') - self.AdvancedLayout.addWidget(self.AdvancedSearchButton, 6, 3, 1, 1) - self.AdvancedVerticalLayout.addLayout(self.AdvancedLayout) - self.AdvancedSecondBibleComboBox = QtGui.QComboBox(self.AdvancedTab) - self.AdvancedSecondBibleComboBox.setObjectName(u'SecondBible') - self.AdvancedVerticalLayout.addWidget(self.AdvancedSecondBibleComboBox) - self.AdvancedMessage = QtGui.QLabel(self.QuickTab) + self.AdvancedSearchButtonLayout.addWidget(self.AdvancedSearchButton) + self.AdvancedLayout.addLayout(self.AdvancedSearchButtonLayout, 7, 0, 1, 3) + self.AdvancedMessage = QtGui.QLabel(self.AdvancedTab) self.AdvancedMessage.setObjectName(u'AdvancedMessage') - self.AdvancedVerticalLayout.addWidget(self.AdvancedMessage) + self.AdvancedLayout.addWidget(self.AdvancedMessage, 8, 0, 1, 3) self.SearchTabWidget.addTab(self.AdvancedTab, u'Advanced') # Add the search tab widget to the page layout self.PageLayout.addWidget(self.SearchTabWidget) @@ -209,16 +231,22 @@ class BibleMediaItem(MediaManagerItem): def configUpdated(self): if str_to_bool( self.parent.config.get_config(u'dual bibles', u'False')): + self.AdvancedSecondBibleLabel.setVisible(True) self.AdvancedSecondBibleComboBox.setVisible(True) + self.QuickSecondVersionLabel.setVisible(True) self.QuickSecondBibleComboBox.setVisible(True) else: + self.AdvancedSecondBibleLabel.setVisible(False) self.AdvancedSecondBibleComboBox.setVisible(False) + self.QuickSecondVersionLabel.setVisible(False) self.QuickSecondBibleComboBox.setVisible(False) def retranslateUi(self): log.debug(u'retranslateUi') self.QuickVersionLabel.setText( translate(u'BibleMediaItem', u'Version:')) + self.QuickSecondVersionLabel.setText( + translate(u'BibleMediaItem', u'Dual:')) self.QuickSearchLabel.setText( translate(u'BibleMediaItem', u'Search Type:')) self.QuickSearchLabel.setText(translate(u'BibleMediaItem', u'Find:')) @@ -226,6 +254,8 @@ class BibleMediaItem(MediaManagerItem): self.QuickClearLabel.setText(translate(u'BibleMediaItem', u'Results:')) self.AdvancedVersionLabel.setText( translate(u'BibleMediaItem', u'Version:')) + self.AdvancedSecondBibleLabel.setText( + translate(u'BibleMediaItem', u'Dual:')) self.AdvancedBookLabel.setText(translate(u'BibleMediaItem', u'Book:')) self.AdvancedChapterLabel.setText( translate(u'BibleMediaItem', u'Chapter:')) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index d30d36df4..6a02f5ff6 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -68,6 +68,7 @@ class SongMediaItem(MediaManagerItem): u'Maintain the lists of authors, topics and books'), ':/songs/song_maintenance.png', self.onSongMaintenanceClick, 'SongMaintenanceItem') + self.PageLayout.setSpacing(4) self.SearchLayout = QtGui.QFormLayout() self.SearchLayout.setMargin(0) self.SearchLayout.setSpacing(4) diff --git a/resources/forms/amendthemedialog.ui b/resources/forms/amendthemedialog.ui index 84fa8b7bd..90ed34cc5 100644 --- a/resources/forms/amendthemedialog.ui +++ b/resources/forms/amendthemedialog.ui @@ -17,7 +17,7 @@ Theme Maintance - + :/icon/openlp.org-icon-32.bmp:/icon/openlp.org-icon-32.bmp @@ -64,7 +64,7 @@ - 0 + 2 @@ -312,15 +312,32 @@ 0 - - 16 - pt 999 + + 16 + + + + + + + Wrap Indentation + + + + + + + + + + TextLabel + @@ -425,15 +442,15 @@ 0 - - 0 - px 9999 + + 0 + @@ -609,15 +626,15 @@ 0 - - 10 - pt 999 + + 10 + @@ -728,15 +745,15 @@ 0 - - 0 - px 9999 + + 0 + @@ -753,15 +770,15 @@ 0 - - 0 - px 9999 + + 0 +