forked from openlp/openlp
Add theme bold/Italics to renderer
This commit is contained in:
parent
66eed38671
commit
279c34a67e
@ -558,13 +558,15 @@ class Renderer(object):
|
||||
"""
|
||||
self.footerFont = QtGui.QFont(self._theme.font_footer_name,
|
||||
int(self._theme.font_footer_proportion), # size
|
||||
QtGui.QFont.Normal, # weight
|
||||
0)# italic
|
||||
int(self._theme.font_footer_weight), # weight
|
||||
0)# italic
|
||||
self.footerFont.setItalic(int(self._theme.font_footer_italics))
|
||||
self.footerFont.setPixelSize(int(self._theme.font_footer_proportion))
|
||||
self.mainFont = QtGui.QFont(self._theme.font_main_name,
|
||||
int(self._theme.font_main_proportion), # size
|
||||
QtGui.QFont.Normal, # weight
|
||||
int(self._theme.font_main_weight), # weight
|
||||
0)# italic
|
||||
self.mainFont.setItalic(int(self._theme.font_main_italics))
|
||||
self.mainFont.setPixelSize(int(self._theme.font_main_proportion))
|
||||
|
||||
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False, color=None):
|
||||
|
@ -46,12 +46,16 @@ blankthemexml=\
|
||||
<name>Arial</name>
|
||||
<color>#000000</color>
|
||||
<proportion>30</proportion>
|
||||
<weight>50</weight>
|
||||
<italics>0</italics>
|
||||
<location override="False" x="0" y="0" width="0" height="0"/>
|
||||
</font>
|
||||
<font type="footer">
|
||||
<name>Arial</name>
|
||||
<color>#000000</color>
|
||||
<proportion>12</proportion>
|
||||
<weight>50</weight>
|
||||
<italics>0</italics>
|
||||
<location override="False" x="0" y="0" width="0" height="0"/>
|
||||
</font>
|
||||
<display>
|
||||
|
@ -165,6 +165,16 @@ class Ui_AmendThemeDialog(object):
|
||||
self.FontMainSizeSpinBox.setMaximum(999)
|
||||
self.FontMainSizeSpinBox.setObjectName(u'FontMainSizeSpinBox')
|
||||
self.MainFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontMainSizeSpinBox)
|
||||
self.FontMainWeightComboBox = QtGui.QComboBox(self.FontMainGroupBox)
|
||||
self.FontMainWeightComboBox.setObjectName("FontMainWeightComboBox")
|
||||
self.FontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.FontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.FontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.FontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.MainFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontMainWeightComboBox)
|
||||
self.FontMainWeightLabel = QtGui.QLabel(self.FontMainGroupBox)
|
||||
self.FontMainWeightLabel.setObjectName("FontMainWeightLabel")
|
||||
self.MainFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontMainWeightLabel)
|
||||
self.MainLeftLayout.addWidget(self.FontMainGroupBox)
|
||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.MainLeftLayout.addItem(spacerItem1)
|
||||
@ -292,6 +302,16 @@ class Ui_AmendThemeDialog(object):
|
||||
self.FontFooterSizeSpinBox.setMaximum(999)
|
||||
self.FontFooterSizeSpinBox.setObjectName(u'FontFooterSizeSpinBox')
|
||||
self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontFooterSizeSpinBox)
|
||||
self.FontFooterWeightComboBox = QtGui.QComboBox(self.FooterFontGroupBox)
|
||||
self.FontFooterWeightComboBox.setObjectName("FontFooterWeightComboBox")
|
||||
self.FontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.FontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.FontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.FontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.FooterFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontFooterWeightComboBox)
|
||||
self.FontFooterWeightLabel = QtGui.QLabel(self.FooterFontGroupBox)
|
||||
self.FontFooterWeightLabel.setObjectName("FontFooterWeightLabel")
|
||||
self.FooterFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontFooterWeightLabel)
|
||||
self.FooterLeftLayout.addWidget(self.FooterFontGroupBox)
|
||||
spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.FooterLeftLayout.addItem(spacerItem3)
|
||||
@ -550,6 +570,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.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:'))
|
||||
self.FontMainXLabel.setText(translate(u'AmendThemeDialog', u'X Position:'))
|
||||
@ -566,6 +591,11 @@ class Ui_AmendThemeDialog(object):
|
||||
self.FontFooterColorLabel.setText(translate(u'AmendThemeDialog', u'Font Color:'))
|
||||
self.FontFooterSizeLabel.setText(translate(u'AmendThemeDialog', u'Size:'))
|
||||
self.FontFooterSizeSpinBox.setSuffix(translate(u'AmendThemeDialog', u'pt'))
|
||||
self.FontFooterWeightComboBox.setItemText(0, translate("AmendThemeDialog", u'Normal'))
|
||||
self.FontFooterWeightComboBox.setItemText(1, translate("AmendThemeDialog", u'Bold'))
|
||||
self.FontFooterWeightComboBox.setItemText(2, translate("AmendThemeDialog", u'Italics'))
|
||||
self.FontFooterWeightComboBox.setItemText(3, translate("AmendThemeDialog", u'Bold/Italics'))
|
||||
self.FontFooterWeightLabel.setText(translate("AmendThemeDialog", u'Font Weight:'))
|
||||
self.LocationFooterGroupBox.setTitle(translate(u'AmendThemeDialog', u'Display Location'))
|
||||
self.FontFooterDefaultLabel.setText(translate(u'AmendThemeDialog', u'Use Default Location:'))
|
||||
self.FontFooterXLabel.setText(translate(u'AmendThemeDialog', u'X Position:'))
|
||||
|
Loading…
Reference in New Issue
Block a user