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>
|
<proportion>30</proportion>
|
||||||
<weight>Normal</weight>
|
<weight>Normal</weight>
|
||||||
<italics>False</italics>
|
<italics>False</italics>
|
||||||
<indentation>0</indentation>
|
|
||||||
<line_adjustment>0</line_adjustment>
|
<line_adjustment>0</line_adjustment>
|
||||||
<location override="False" x="10" y="10" width="1004" height="730"/>
|
<location override="False" x="10" y="10" width="1004" height="730"/>
|
||||||
</font>
|
</font>
|
||||||
@ -65,7 +64,6 @@ BLANK_THEME_XML = \
|
|||||||
<proportion>12</proportion>
|
<proportion>12</proportion>
|
||||||
<weight>Normal</weight>
|
<weight>Normal</weight>
|
||||||
<italics>False</italics>
|
<italics>False</italics>
|
||||||
<indentation>0</indentation>
|
|
||||||
<line_adjustment>0</line_adjustment>
|
<line_adjustment>0</line_adjustment>
|
||||||
<location override="False" x="10" y="730" width="1004" height="38"/>
|
<location override="False" x="10" y="730" width="1004" height="38"/>
|
||||||
</font>
|
</font>
|
||||||
@ -184,7 +182,7 @@ class ThemeXML(object):
|
|||||||
self.child_element(background, u'filename', filename)
|
self.child_element(background, u'filename', filename)
|
||||||
|
|
||||||
def add_font(self, name, color, proportion, override, fonttype=u'main',
|
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):
|
xpos=0, ypos=0, width=0, height=0):
|
||||||
"""
|
"""
|
||||||
Add a Font.
|
Add a Font.
|
||||||
@ -210,9 +208,6 @@ class ThemeXML(object):
|
|||||||
``italics``
|
``italics``
|
||||||
Does the font render to italics Defaults to 0 Normal
|
Does the font render to italics Defaults to 0 Normal
|
||||||
|
|
||||||
``indentation``
|
|
||||||
Number of characters the wrap line is indented
|
|
||||||
|
|
||||||
``xpos``
|
``xpos``
|
||||||
The X position of the text block.
|
The X position of the text block.
|
||||||
|
|
||||||
@ -239,8 +234,6 @@ class ThemeXML(object):
|
|||||||
#Create italics name element
|
#Create italics name element
|
||||||
self.child_element(background, u'italics', italics)
|
self.child_element(background, u'italics', italics)
|
||||||
#Create indentation name element
|
#Create indentation name element
|
||||||
self.child_element(background, u'indentation', unicode(indentation))
|
|
||||||
#Create indentation name element
|
|
||||||
self.child_element(
|
self.child_element(
|
||||||
background, u'line_adjustment', unicode(line_adjustment))
|
background, u'line_adjustment', unicode(line_adjustment))
|
||||||
|
|
||||||
|
@ -216,17 +216,17 @@ class Ui_AmendThemeDialog(object):
|
|||||||
self.fontMainLineAdjustmentSpinBox.setMinimum(-99)
|
self.fontMainLineAdjustmentSpinBox.setMinimum(-99)
|
||||||
self.mainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
|
self.mainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
|
||||||
self.fontMainLineAdjustmentSpinBox)
|
self.fontMainLineAdjustmentSpinBox)
|
||||||
self.fontMainWrapIndentationLabel = QtGui.QLabel(self.fontMainGroupBox)
|
# self.fontMainWrapIndentationLabel = QtGui.QLabel(self.fontMainGroupBox)
|
||||||
self.fontMainWrapIndentationLabel.setObjectName(
|
# self.fontMainWrapIndentationLabel.setObjectName(
|
||||||
u'fontMainWrapIndentationLabel')
|
# u'fontMainWrapIndentationLabel')
|
||||||
self.mainFontLayout.setWidget(5, QtGui.QFormLayout.LabelRole,
|
# self.mainFontLayout.setWidget(5, QtGui.QFormLayout.LabelRole,
|
||||||
self.fontMainWrapIndentationLabel)
|
# self.fontMainWrapIndentationLabel)
|
||||||
self.fontMainLineSpacingSpinBox = QtGui.QSpinBox(self.fontMainGroupBox)
|
# self.fontMainLineSpacingSpinBox = QtGui.QSpinBox(self.fontMainGroupBox)
|
||||||
self.fontMainLineSpacingSpinBox.setObjectName(
|
# self.fontMainLineSpacingSpinBox.setObjectName(
|
||||||
u'fontMainLineSpacingSpinBox')
|
# u'fontMainLineSpacingSpinBox')
|
||||||
self.fontMainLineSpacingSpinBox.setMaximum(10)
|
# self.fontMainLineSpacingSpinBox.setMaximum(10)
|
||||||
self.mainFontLayout.setWidget(5, QtGui.QFormLayout.FieldRole,
|
# self.mainFontLayout.setWidget(5, QtGui.QFormLayout.FieldRole,
|
||||||
self.fontMainLineSpacingSpinBox)
|
# self.fontMainLineSpacingSpinBox)
|
||||||
self.fontMainLinesPageLabel = QtGui.QLabel(self.fontMainGroupBox)
|
self.fontMainLinesPageLabel = QtGui.QLabel(self.fontMainGroupBox)
|
||||||
self.fontMainLinesPageLabel.setObjectName(u'fontMainLinesPageLabel')
|
self.fontMainLinesPageLabel.setObjectName(u'fontMainLinesPageLabel')
|
||||||
self.mainFontLayout.addRow(self.fontMainLinesPageLabel)
|
self.mainFontLayout.addRow(self.fontMainLinesPageLabel)
|
||||||
@ -700,8 +700,8 @@ class Ui_AmendThemeDialog(object):
|
|||||||
translate('OpenLP.AmendThemeForm', 'Size:'))
|
translate('OpenLP.AmendThemeForm', 'Size:'))
|
||||||
self.fontMainSizeSpinBox.setSuffix(
|
self.fontMainSizeSpinBox.setSuffix(
|
||||||
translate('OpenLP.AmendThemeForm', 'pt'))
|
translate('OpenLP.AmendThemeForm', 'pt'))
|
||||||
self.fontMainWrapIndentationLabel.setText(
|
# self.fontMainWrapIndentationLabel.setText(
|
||||||
translate('OpenLP.AmendThemeForm', 'Wrap indentation:'))
|
# translate('OpenLP.AmendThemeForm', 'Wrap indentation:'))
|
||||||
self.fontMainWrapLineAdjustmentLabel.setText(
|
self.fontMainWrapLineAdjustmentLabel.setText(
|
||||||
translate('OpenLP.AmendThemeForm', 'Adjust line spacing:'))
|
translate('OpenLP.AmendThemeForm', 'Adjust line spacing:'))
|
||||||
self.fontMainWeightComboBox.setItemText(0,
|
self.fontMainWeightComboBox.setItemText(0,
|
||||||
|
@ -109,9 +109,9 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
QtCore.QObject.connect(self.fontMainLineAdjustmentSpinBox,
|
QtCore.QObject.connect(self.fontMainLineAdjustmentSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontMainLineAdjustmentSpinBoxChanged)
|
self.onFontMainLineAdjustmentSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.fontMainLineSpacingSpinBox,
|
# QtCore.QObject.connect(self.fontMainLineSpacingSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
# QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontMainLineSpacingSpinBoxChanged)
|
# self.onFontMainLineSpacingSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.fontFooterXSpinBox,
|
QtCore.QObject.connect(self.fontFooterXSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontFooterXSpinBoxChanged)
|
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_override), u'main',
|
||||||
unicode(self.theme.font_main_weight),
|
unicode(self.theme.font_main_weight),
|
||||||
unicode(self.theme.font_main_italics),
|
unicode(self.theme.font_main_italics),
|
||||||
unicode(self.theme.font_main_indentation),
|
|
||||||
unicode(self.theme.font_main_line_adjustment),
|
unicode(self.theme.font_main_line_adjustment),
|
||||||
unicode(self.theme.font_main_x),
|
unicode(self.theme.font_main_x),
|
||||||
unicode(self.theme.font_main_y),
|
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_override), u'footer',
|
||||||
unicode(self.theme.font_footer_weight),
|
unicode(self.theme.font_footer_weight),
|
||||||
unicode(self.theme.font_footer_italics),
|
unicode(self.theme.font_footer_italics),
|
||||||
0, # indentation
|
|
||||||
0, # line adjustment
|
0, # line adjustment
|
||||||
unicode(self.theme.font_footer_x),
|
unicode(self.theme.font_footer_x),
|
||||||
unicode(self.theme.font_footer_y),
|
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.fontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
||||||
self.fontMainLineAdjustmentSpinBox.setValue(
|
self.fontMainLineAdjustmentSpinBox.setValue(
|
||||||
self.theme.font_main_line_adjustment)
|
self.theme.font_main_line_adjustment)
|
||||||
self.fontMainLineSpacingSpinBox.setValue(
|
# self.fontMainLineSpacingSpinBox.setValue(
|
||||||
self.theme.font_main_indentation)
|
# self.theme.font_main_indentation)
|
||||||
self.stateChanging(self.theme)
|
self.stateChanging(self.theme)
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
@ -310,12 +308,12 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.fontMainLineAdjustmentSpinBox.value()
|
self.fontMainLineAdjustmentSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainLineSpacingSpinBoxChanged(self):
|
# def onFontMainLineSpacingSpinBoxChanged(self):
|
||||||
if self.theme.font_main_indentation != \
|
# if self.theme.font_main_indentation != \
|
||||||
self.fontMainLineSpacingSpinBox.value():
|
# self.fontMainLineSpacingSpinBox.value():
|
||||||
self.theme.font_main_indentation = \
|
# self.theme.font_main_indentation = \
|
||||||
self.fontMainLineSpacingSpinBox.value()
|
# self.fontMainLineSpacingSpinBox.value()
|
||||||
self.previewTheme()
|
# self.previewTheme()
|
||||||
|
|
||||||
def onFontMainHeightSpinBoxChanged(self):
|
def onFontMainHeightSpinBoxChanged(self):
|
||||||
if self.theme.font_main_height != self.fontMainHeightSpinBox.value():
|
if self.theme.font_main_height != self.fontMainHeightSpinBox.value():
|
||||||
@ -576,8 +574,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.fontMainWeightComboBox.setCurrentIndex(2)
|
self.fontMainWeightComboBox.setCurrentIndex(2)
|
||||||
else:
|
else:
|
||||||
self.fontMainWeightComboBox.setCurrentIndex(3)
|
self.fontMainWeightComboBox.setCurrentIndex(3)
|
||||||
self.fontMainLineSpacingSpinBox.setValue(
|
# self.fontMainLineSpacingSpinBox.setValue(
|
||||||
self.theme.font_main_indentation)
|
# self.theme.font_main_indentation)
|
||||||
self.fontMainXSpinBox.setValue(self.theme.font_main_x)
|
self.fontMainXSpinBox.setValue(self.theme.font_main_x)
|
||||||
self.fontMainYSpinBox.setValue(self.theme.font_main_y)
|
self.fontMainYSpinBox.setValue(self.theme.font_main_y)
|
||||||
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||||
|
@ -731,8 +731,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
theme.display_slideTransition = theme.display_slideTransition
|
theme.display_slideTransition = theme.display_slideTransition
|
||||||
theme.font_footer_color = theme.font_footer_color.strip()
|
theme.font_footer_color = theme.font_footer_color.strip()
|
||||||
theme.font_footer_height = int(theme.font_footer_height.strip())
|
theme.font_footer_height = int(theme.font_footer_height.strip())
|
||||||
theme.font_footer_indentation = \
|
# theme.font_footer_indentation = \
|
||||||
int(theme.font_footer_indentation.strip())
|
# int(theme.font_footer_indentation.strip())
|
||||||
theme.font_footer_italics = str_to_bool(theme.font_footer_italics)
|
theme.font_footer_italics = str_to_bool(theme.font_footer_italics)
|
||||||
theme.font_footer_name = theme.font_footer_name.strip()
|
theme.font_footer_name = theme.font_footer_name.strip()
|
||||||
#theme.font_footer_override
|
#theme.font_footer_override
|
||||||
@ -745,7 +745,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
theme.font_main_color = theme.font_main_color.strip()
|
theme.font_main_color = theme.font_main_color.strip()
|
||||||
theme.font_main_height = int(theme.font_main_height.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_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_name = theme.font_main_name.strip()
|
||||||
#theme.font_main_override
|
#theme.font_main_override
|
||||||
theme.font_main_proportion = int(theme.font_main_proportion.strip())
|
theme.font_main_proportion = int(theme.font_main_proportion.strip())
|
||||||
|
Loading…
Reference in New Issue
Block a user