Esempio n. 1
0
 def setColorScheme(self):
     keys = self._getDatasKeys()
     color = self.attrs.get('color', 'blue')
     r, g, b = hex2rgb(COLOR_SCHEMES.get(color, color))
     maxcolor = max(max(r, g), b)
     self.colorScheme = generateColorscheme(color, keys,
                                            maxcolor / (len(keys) or 1))
     for yfield in self.yfields:
         if yfield.get('color'):
             self.colorScheme[yfield.get('key', yfield['name'])] = hex2rgb(
                 COLOR_SCHEMES.get(yfield['color'], yfield['color']))
Esempio n. 2
0
 def setColorScheme(self):
     keys = self._getDatasKeys()
     color = self.attrs.get('color', 'blue')
     r, g, b = hex2rgb(COLOR_SCHEMES.get(color, color))
     maxcolor = max(max(r, g), b)
     self.colorScheme = generateColorscheme(color, keys,
             maxcolor / (len(keys) or 1))
     for yfield in self.yfields:
         if yfield.get('color'):
             self.colorScheme[yfield.get('key', yfield['name'])] = hex2rgb(
                     COLOR_SCHEMES.get(yfield['color'], yfield['color']))
Esempio n. 3
0
 def message_info(self, message, color='red'):
     if message:
         self.info_label.set_label(message)
         self.eb_info.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(
             COLOR_SCHEMES.get(color, 'white')))
         self.eb_info.show_all()
     else:
         self.info_label.set_label('')
         self.eb_info.hide()
 def message_info(self, message, color='red'):
     if message:
         self.info_label.set_label(message)
         self.eb_info.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(
             COLOR_SCHEMES.get(color, 'white')))
         self.eb_info.show_all()
     else:
         self.info_label.set_label('')
         self.eb_info.hide()