From 58f7f248e30e7f4d8017b06c144a294042031e6d Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 21 Aug 2010 08:46:00 +0100 Subject: [PATCH] Remove text indentation --- openlp/core/lib/theme.py | 9 +-------- openlp/core/ui/amendthemedialog.py | 26 +++++++++++++------------- openlp/core/ui/amendthemeform.py | 28 +++++++++++++--------------- openlp/core/ui/thememanager.py | 6 +++--- 4 files changed, 30 insertions(+), 39 deletions(-) diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 9f084e40c..50894cc47 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -55,7 +55,6 @@ BLANK_THEME_XML = \ 30 Normal False - 0 0 @@ -65,7 +64,6 @@ BLANK_THEME_XML = \ 12 Normal False - 0 0 @@ -184,7 +182,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', indentation=0, line_adjustment=0, + weight=u'Normal', italics=u'False', line_adjustment=0, xpos=0, ypos=0, width=0, height=0): """ Add a Font. @@ -210,9 +208,6 @@ 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. @@ -239,8 +234,6 @@ class ThemeXML(object): #Create italics name element self.child_element(background, u'italics', italics) #Create indentation name element - self.child_element(background, u'indentation', unicode(indentation)) - #Create indentation name element self.child_element( background, u'line_adjustment', unicode(line_adjustment)) diff --git a/openlp/core/ui/amendthemedialog.py b/openlp/core/ui/amendthemedialog.py index 6817d4883..e2f779371 100644 --- a/openlp/core/ui/amendthemedialog.py +++ b/openlp/core/ui/amendthemedialog.py @@ -216,17 +216,17 @@ class Ui_AmendThemeDialog(object): self.fontMainLineAdjustmentSpinBox.setMinimum(-99) self.mainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.fontMainLineAdjustmentSpinBox) - self.fontMainWrapIndentationLabel = QtGui.QLabel(self.fontMainGroupBox) - self.fontMainWrapIndentationLabel.setObjectName( - u'fontMainWrapIndentationLabel') - self.mainFontLayout.setWidget(5, QtGui.QFormLayout.LabelRole, - self.fontMainWrapIndentationLabel) - self.fontMainLineSpacingSpinBox = QtGui.QSpinBox(self.fontMainGroupBox) - self.fontMainLineSpacingSpinBox.setObjectName( - u'fontMainLineSpacingSpinBox') - self.fontMainLineSpacingSpinBox.setMaximum(10) - self.mainFontLayout.setWidget(5, QtGui.QFormLayout.FieldRole, - self.fontMainLineSpacingSpinBox) +# self.fontMainWrapIndentationLabel = QtGui.QLabel(self.fontMainGroupBox) +# self.fontMainWrapIndentationLabel.setObjectName( +# u'fontMainWrapIndentationLabel') +# self.mainFontLayout.setWidget(5, QtGui.QFormLayout.LabelRole, +# self.fontMainWrapIndentationLabel) +# self.fontMainLineSpacingSpinBox = QtGui.QSpinBox(self.fontMainGroupBox) +# self.fontMainLineSpacingSpinBox.setObjectName( +# u'fontMainLineSpacingSpinBox') +# self.fontMainLineSpacingSpinBox.setMaximum(10) +# self.mainFontLayout.setWidget(5, QtGui.QFormLayout.FieldRole, +# self.fontMainLineSpacingSpinBox) self.fontMainLinesPageLabel = QtGui.QLabel(self.fontMainGroupBox) self.fontMainLinesPageLabel.setObjectName(u'fontMainLinesPageLabel') self.mainFontLayout.addRow(self.fontMainLinesPageLabel) @@ -700,8 +700,8 @@ class Ui_AmendThemeDialog(object): translate('OpenLP.AmendThemeForm', 'Size:')) self.fontMainSizeSpinBox.setSuffix( translate('OpenLP.AmendThemeForm', 'pt')) - self.fontMainWrapIndentationLabel.setText( - translate('OpenLP.AmendThemeForm', 'Wrap indentation:')) +# self.fontMainWrapIndentationLabel.setText( +# translate('OpenLP.AmendThemeForm', 'Wrap indentation:')) self.fontMainWrapLineAdjustmentLabel.setText( translate('OpenLP.AmendThemeForm', 'Adjust line spacing:')) self.fontMainWeightComboBox.setItemText(0, diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py index a2602ef9f..6ee4f9614 100644 --- a/openlp/core/ui/amendthemeform.py +++ b/openlp/core/ui/amendthemeform.py @@ -109,9 +109,9 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): QtCore.QObject.connect(self.fontMainLineAdjustmentSpinBox, QtCore.SIGNAL(u'editingFinished()'), self.onFontMainLineAdjustmentSpinBoxChanged) - QtCore.QObject.connect(self.fontMainLineSpacingSpinBox, - QtCore.SIGNAL(u'editingFinished()'), - self.onFontMainLineSpacingSpinBoxChanged) +# QtCore.QObject.connect(self.fontMainLineSpacingSpinBox, +# QtCore.SIGNAL(u'editingFinished()'), +# self.onFontMainLineSpacingSpinBoxChanged) QtCore.QObject.connect(self.fontFooterXSpinBox, QtCore.SIGNAL(u'editingFinished()'), self.onFontFooterXSpinBoxChanged) @@ -174,7 +174,6 @@ 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_line_adjustment), unicode(self.theme.font_main_x), unicode(self.theme.font_main_y), @@ -186,7 +185,6 @@ 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, # indentation 0, # line adjustment unicode(self.theme.font_footer_x), unicode(self.theme.font_footer_y), @@ -283,8 +281,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.fontMainHeightSpinBox.setValue(self.theme.font_main_height) self.fontMainLineAdjustmentSpinBox.setValue( self.theme.font_main_line_adjustment) - self.fontMainLineSpacingSpinBox.setValue( - self.theme.font_main_indentation) +# self.fontMainLineSpacingSpinBox.setValue( +# self.theme.font_main_indentation) self.stateChanging(self.theme) self.previewTheme() @@ -310,12 +308,12 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.fontMainLineAdjustmentSpinBox.value() self.previewTheme() - def onFontMainLineSpacingSpinBoxChanged(self): - if self.theme.font_main_indentation != \ - self.fontMainLineSpacingSpinBox.value(): - self.theme.font_main_indentation = \ - self.fontMainLineSpacingSpinBox.value() - self.previewTheme() +# def onFontMainLineSpacingSpinBoxChanged(self): +# if self.theme.font_main_indentation != \ +# self.fontMainLineSpacingSpinBox.value(): +# self.theme.font_main_indentation = \ +# self.fontMainLineSpacingSpinBox.value() +# self.previewTheme() def onFontMainHeightSpinBoxChanged(self): if self.theme.font_main_height != self.fontMainHeightSpinBox.value(): @@ -576,8 +574,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): self.fontMainWeightComboBox.setCurrentIndex(2) else: self.fontMainWeightComboBox.setCurrentIndex(3) - self.fontMainLineSpacingSpinBox.setValue( - self.theme.font_main_indentation) +# self.fontMainLineSpacingSpinBox.setValue( +# self.theme.font_main_indentation) self.fontMainXSpinBox.setValue(self.theme.font_main_x) self.fontMainYSpinBox.setValue(self.theme.font_main_y) self.fontMainWidthSpinBox.setValue(self.theme.font_main_width) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index d30a77515..15ad70567 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -731,8 +731,8 @@ class ThemeManager(QtGui.QWidget): theme.display_slideTransition = theme.display_slideTransition theme.font_footer_color = theme.font_footer_color.strip() theme.font_footer_height = int(theme.font_footer_height.strip()) - theme.font_footer_indentation = \ - int(theme.font_footer_indentation.strip()) +# theme.font_footer_indentation = \ +# int(theme.font_footer_indentation.strip()) theme.font_footer_italics = str_to_bool(theme.font_footer_italics) theme.font_footer_name = theme.font_footer_name.strip() #theme.font_footer_override @@ -745,7 +745,7 @@ class ThemeManager(QtGui.QWidget): theme.font_main_color = theme.font_main_color.strip() theme.font_main_height = int(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_indentation = int(theme.font_main_indentation) theme.font_main_name = theme.font_main_name.strip() #theme.font_main_override theme.font_main_proportion = int(theme.font_main_proportion.strip())