forked from openlp/openlp
Fix htmlbuilder
This commit is contained in:
parent
cf2d215534
commit
7dcac8ea54
@ -370,29 +370,32 @@ def build_background_css(item, width, height):
|
|||||||
theme = item.themedata
|
theme = item.themedata
|
||||||
background = u'background-color: black'
|
background = u'background-color: black'
|
||||||
if theme:
|
if theme:
|
||||||
if theme.background_type == BackgroundType.Solid:
|
if theme.background_type == BackgroundType.to_string(BackgroundType.Solid):
|
||||||
background = u'background-color: %s' % theme.background_color
|
background = u'background-color: %s' % theme.background_color
|
||||||
else:
|
else:
|
||||||
if theme.background_direction == BackgroundGradientType.Horizontal:
|
if theme.background_direction == BackgroundGradientType.to_string \
|
||||||
|
(BackgroundGradientType.Horizontal):
|
||||||
background = \
|
background = \
|
||||||
u'background: ' \
|
u'background: ' \
|
||||||
u'-webkit-gradient(linear, left top, left bottom, ' \
|
u'-webkit-gradient(linear, left top, left bottom, ' \
|
||||||
'from(%s), to(%s))' % (theme.background_start_color,
|
'from(%s), to(%s))' % (theme.background_start_color,
|
||||||
theme.background_end_color)
|
theme.background_end_color)
|
||||||
elif theme.background_direction == BackgroundGradientType.LeftTop:
|
elif theme.background_direction == BackgroundGradientType.to_string \
|
||||||
|
(BackgroundGradientType.LeftTop):
|
||||||
background = \
|
background = \
|
||||||
u'background: ' \
|
u'background: ' \
|
||||||
u'-webkit-gradient(linear, left top, right bottom, ' \
|
u'-webkit-gradient(linear, left top, right bottom, ' \
|
||||||
'from(%s), to(%s))' % (theme.background_start_color,
|
'from(%s), to(%s))' % (theme.background_start_color,
|
||||||
theme.background_end_color)
|
theme.background_end_color)
|
||||||
elif theme.background_direction == \
|
elif theme.background_direction == BackgroundGradientType.to_string \
|
||||||
BackgroundGradientType.LeftBottom:
|
(BackgroundGradientType.LeftBottom):
|
||||||
background = \
|
background = \
|
||||||
u'background: ' \
|
u'background: ' \
|
||||||
u'-webkit-gradient(linear, left bottom, right top, ' \
|
u'-webkit-gradient(linear, left bottom, right top, ' \
|
||||||
'from(%s), to(%s))' % (theme.background_start_color,
|
'from(%s), to(%s))' % (theme.background_start_color,
|
||||||
theme.background_end_color)
|
theme.background_end_color)
|
||||||
elif theme.background_direction == BackgroundGradientType.Vertical:
|
elif theme.background_direction == BackgroundGradientType.to_string \
|
||||||
|
(BackgroundGradientType.Vertical):
|
||||||
background = \
|
background = \
|
||||||
u'background: -webkit-gradient(linear, left top, ' \
|
u'background: -webkit-gradient(linear, left top, ' \
|
||||||
u'right top, from(%s), to(%s))' % \
|
u'right top, from(%s), to(%s))' % \
|
||||||
|
Loading…
Reference in New Issue
Block a user