Esempio n. 1
0
 def set_image_key(self, theme, image_key):
     self.icon_set = theme.get_iconset(image_key)
     if self.icon_set:
         self.post_image_key = image_key
         self.post_background.image = get_image_path(theme.key, image_key)
         self.post_background.color = []
         self.post_color = None
Esempio n. 2
0
 def set_image_key(self, theme, image_key):
     self.icon_set = theme.get_iconset(image_key)
     if self.icon_set:
         self.post_image_key = image_key
         self.post_background.image = get_image_path(theme.key, image_key)
         self.post_background.color = []
         self.post_color = None
Esempio n. 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)
Esempio n. 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)