forked from openlp/openlp
Add screen list to General Tab
Add new Font bits to XML code Add guards to renderer incase of no second text area
This commit is contained in:
parent
5d29da2547
commit
b581fcab8f
@ -89,7 +89,7 @@ class ThemeXML():
|
||||
color.appendChild(bkc)
|
||||
background.appendChild(color)
|
||||
|
||||
def add_font(self, fontname, fontcolor, fontproportion, fonttype=u'main'):
|
||||
def add_font(self, fontname, fontcolor, fontproportion, override, fonttype=u'main', xpos=0, ypos=0 ,width=0, height=0):
|
||||
background = self.theme_xml.createElement(u'font')
|
||||
background.setAttribute(u'type',fonttype)
|
||||
self.theme.appendChild(background)
|
||||
@ -109,6 +109,15 @@ class ThemeXML():
|
||||
name.appendChild(fn)
|
||||
background.appendChild(name)
|
||||
|
||||
name = self.theme_xml.createElement(u'location')
|
||||
name.setAttribute(u'override',override)
|
||||
if override == u'True':
|
||||
name.setAttribute(u'x',str(xpos))
|
||||
name.setAttribute(u'y',str(ypos))
|
||||
name.setAttribute(u'width',str(width))
|
||||
name.setAttribute(u'height',str(height))
|
||||
background.appendChild(name)
|
||||
|
||||
def add_display(self, shadow, shadowColor, outline, outlineColor, horizontal, vertical, wrap):
|
||||
background = self.theme_xml.createElement(u'display')
|
||||
self.theme.appendChild(background)
|
||||
|
@ -248,13 +248,15 @@ class Renderer:
|
||||
#log.debug(u'_render_lines %s', lines)
|
||||
|
||||
bbox=self._render_lines_unaligned(lines, False) # Main font
|
||||
bbox1=self._render_lines_unaligned(lines, True) # Footer Font
|
||||
if lines1 is not None:
|
||||
bbox1=self._render_lines_unaligned(lines1, True) # Footer Font
|
||||
|
||||
# put stuff on background so need to reset before doing the job properly.
|
||||
self._render_background()
|
||||
x, y = self._correctAlignment(self._rect, bbox)
|
||||
bbox=self._render_lines_unaligned(lines, False, (x,y))
|
||||
|
||||
if lines1 is not None:
|
||||
x, y = self._correctAlignment(self._rect_footer, bbox1)
|
||||
bbox=self._render_lines_unaligned(lines1, True, (x,y) )
|
||||
|
||||
|
@ -31,6 +31,7 @@ class GeneralTab(SettingsTab):
|
||||
def __init__(self, screen_list):
|
||||
SettingsTab.__init__(self, translate(u'GeneralTab', u'General'))
|
||||
self.screen_list = screen_list
|
||||
print screen_list
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'GeneralTab')
|
||||
|
Loading…
Reference in New Issue
Block a user