forked from openlp/openlp
Remove text indentation
This commit is contained in:
parent
8459cf1c25
commit
58f7f248e3
@ -55,7 +55,6 @@ BLANK_THEME_XML = \
|
||||
<proportion>30</proportion>
|
||||
<weight>Normal</weight>
|
||||
<italics>False</italics>
|
||||
<indentation>0</indentation>
|
||||
<line_adjustment>0</line_adjustment>
|
||||
<location override="False" x="10" y="10" width="1004" height="730"/>
|
||||
</font>
|
||||
@ -65,7 +64,6 @@ BLANK_THEME_XML = \
|
||||
<proportion>12</proportion>
|
||||
<weight>Normal</weight>
|
||||
<italics>False</italics>
|
||||
<indentation>0</indentation>
|
||||
<line_adjustment>0</line_adjustment>
|
||||
<location override="False" x="10" y="730" width="1004" height="38"/>
|
||||
</font>
|
||||
@ -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))
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user