From 7dcac8ea54a1a37f6e95d793033c076ccc05acc5 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 16 Oct 2010 17:21:02 +0100 Subject: [PATCH] Fix htmlbuilder --- openlp/core/lib/htmlbuilder.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 8966ea237..d4de27bb4 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -370,29 +370,32 @@ def build_background_css(item, width, height): theme = item.themedata background = u'background-color: black' 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 else: - if theme.background_direction == BackgroundGradientType.Horizontal: + if theme.background_direction == BackgroundGradientType.to_string \ + (BackgroundGradientType.Horizontal): background = \ u'background: ' \ u'-webkit-gradient(linear, left top, left bottom, ' \ 'from(%s), to(%s))' % (theme.background_start_color, theme.background_end_color) - elif theme.background_direction == BackgroundGradientType.LeftTop: + elif theme.background_direction == BackgroundGradientType.to_string \ + (BackgroundGradientType.LeftTop): background = \ u'background: ' \ u'-webkit-gradient(linear, left top, right bottom, ' \ 'from(%s), to(%s))' % (theme.background_start_color, theme.background_end_color) - elif theme.background_direction == \ - BackgroundGradientType.LeftBottom: + elif theme.background_direction == BackgroundGradientType.to_string \ + (BackgroundGradientType.LeftBottom): background = \ u'background: ' \ u'-webkit-gradient(linear, left bottom, right top, ' \ 'from(%s), to(%s))' % (theme.background_start_color, theme.background_end_color) - elif theme.background_direction == BackgroundGradientType.Vertical: + elif theme.background_direction == BackgroundGradientType.to_string \ + (BackgroundGradientType.Vertical): background = \ u'background: -webkit-gradient(linear, left top, ' \ u'right top, from(%s), to(%s))' % \