renderer changes

This commit is contained in:
Tim Bentley 2010-03-10 16:57:33 +00:00
parent 47bf6252bb
commit 9bace991fa
2 changed files with 7 additions and 33 deletions

View File

@ -466,38 +466,9 @@ class Renderer(object):
self._get_extent_and_render(line, footer,
tlcorner=(x + display_shadow_size, y + display_shadow_size),
draw=True, color = self._theme.display_shadow_color)
if self._theme.display_outline:
self._get_extent_and_render(line, footer,
(x + display_outline_size, y), draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x, y + display_outline_size), draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x, y - display_outline_size), draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x - display_outline_size, y), draw=True,
color = self._theme.display_outline_color)
if display_outline_size > 1:
self._get_extent_and_render(line, footer,
(x + display_outline_size, y + display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x - display_outline_size, y + display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x + display_outline_size, y - display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x - display_outline_size, y - display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,tlcorner=(x, y),
draw=True)
self._get_extent_and_render(line, footer, tlcorner=(x, y), draw=True,
outline_size=display_outline_size,
outline_color=self._theme.display_outline_color)
y += h
if linenum == 0:
self._first_line_right_extent = rightextent
@ -535,7 +506,7 @@ class Renderer(object):
self.mainFont.setPixelSize(self._theme.font_main_proportion)
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False,
color=None):
color=None, outline_size=0, outline_color=None):
"""
Find bounding box of text - as render_single_line. If draw is set,
actually draw the text to the current DC as well return width and

View File

@ -449,8 +449,10 @@ class SlideController(QtGui.QWidget):
#If verse handle verse number else tag only
if bits[0] == self.trUtf8('Verse'):
tag = u'%s%s' % (bits[0][0], bits[1][0:] )
row = bits[1][0:]
else:
tag = bits[0]
row = bits[0][0:1]
try:
test = self.slideList[tag]
except:
@ -469,6 +471,7 @@ class SlideController(QtGui.QWidget):
self.PreviewListWidget.setCellWidget(framenumber, 0, label)
slide_height = width * self.parent.RenderManager.screen_ratio
self.PreviewListWidget.setItem(framenumber, 0, item)
print row
if slide_height != 0:
self.PreviewListWidget.setRowHeight(framenumber, slide_height)
if self.serviceItem.is_text():