Fix up theme lines per slide text

This commit is contained in:
Tim Bentley 2010-11-24 19:41:14 +00:00
parent e20e336c5e
commit 9cc994e0e0
2 changed files with 34 additions and 7 deletions

View File

@ -220,12 +220,13 @@ class RenderManager(object):
serviceItem.render_manager = self serviceItem.render_manager = self
serviceItem.raw_footer = footer serviceItem.raw_footer = footer
serviceItem.render(True) serviceItem.render(True)
self.display.buildHtml(serviceItem) if not self.force_page:
raw_html = serviceItem.get_rendered_frame(0) self.display.buildHtml(serviceItem)
preview = self.display.text(raw_html) raw_html = serviceItem.get_rendered_frame(0)
# Reset the real screen size for subsequent render requests preview = self.display.text(raw_html)
self.calculate_default(self.screens.current[u'size']) # Reset the real screen size for subsequent render requests
return preview self.calculate_default(self.screens.current[u'size'])
return preview
def format_slide(self, words, line_break): def format_slide(self, words, line_break):
""" """

View File

@ -100,6 +100,33 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'theme_line_count'), QtCore.SIGNAL(u'theme_line_count'),
self.updateLinesText) self.updateLinesText)
QtCore.QObject.connect(self.mainSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.calculateLines)
QtCore.QObject.connect(self.mainSizeSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.calculateLines)
QtCore.QObject.connect(self.lineSpacingSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.calculateLines)
QtCore.QObject.connect(self.lineSpacingSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.calculateLines)
QtCore.QObject.connect(self.outlineSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.calculateLines)
QtCore.QObject.connect(self.outlineSizeSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.calculateLines)
QtCore.QObject.connect(self.shadowSizeSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.calculateLines)
QtCore.QObject.connect(self.shadowSizeSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.calculateLines)
QtCore.QObject.connect(self.mainFontComboBox,
QtCore.SIGNAL(u'activated(int)'),
self.calculateLines)
def pageChanged(self, pageId): def pageChanged(self, pageId):
""" """
@ -266,7 +293,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
Set up the pages for Initial run through dialog Set up the pages for Initial run through dialog
""" """
log.debug(u'initializePage %s' % id) log.debug(u'initializePage %s' % id)
print u'initializePage %s' % id
self.page = id self.page = id
if id == 1: if id == 1:
self.setBackgroundTabValues() self.setBackgroundTabValues()