Example #1
0
 def _resolve_sys_data(self, data):
     data['font_color'] = get_color_from_hex(data.get('font_color', 'FFFFFFFF'))
     background = data.get('background', 'unknown')
     color = PostTheme.get_color(background)
     if color:
         data['color'] = get_color_from_hex(color)
     else:
         _, ext = splitext(background)
         if ext in ['.jpg', '.png']:
             data['image'] = join(system_posts_path, background)
Example #2
0
 def _resolve_sys_data(self, data):
     data['font_color'] = get_color_from_hex(
         data.get('font_color', 'FFFFFFFF'))
     background = data.get('background', 'unknown')
     color = PostTheme.get_color(background)
     if color:
         data['color'] = get_color_from_hex(color)
     else:
         _, ext = splitext(background)
         if ext in ['.jpg', '.png']:
             data['image'] = join(system_posts_path, background)
Example #3
0
 def _resolve_user_data(self, data):
     background = data.get('background', 'unknown')
     theme = data.get('theme', 'unknown')
     icon_set = None
     image = None
     color = None
     t = get_post_theme(theme)
     if t:
         icon_set = t.get_iconset(background)
         color = PostTheme.get_color(background)
         if not color:
             image = get_image_path(t.key, background)
     if icon_set:
         data['icon_set'] = icon_set
     if image:
         data['image'] = image
     if color:
         data['color'] = get_color_from_hex(color)
Example #4
0
 def _resolve_user_data(self, data):
     background = data.get('background', 'unknown')
     theme = data.get('theme', 'unknown')
     icon_set = None
     image = None
     color = None
     t = get_post_theme(theme)
     if t:
         icon_set = t.get_iconset(background)
         color = PostTheme.get_color(background)
         if not color:
             image = get_image_path(t.key, background)
     if icon_set:
         data['icon_set'] = icon_set
     if image:
         data['image'] = image
     if color:
         data['color'] = get_color_from_hex(color)