コード例 #1
0
ファイル: state_widget.py プロジェクト: coopengo/tryton
 def _set_foreground(self, value, attrlist):
     if value not in COLOR_RGB:
         logging.getLogger(__name__).info('This color is not supported' +
             '=> %s' % value)
     color = COLOR_RGB.get(value, COLOR_RGB['black'])
     attrlist.change(pango.AttrForeground(color[0], color[1],
             color[2], 0, -1))
コード例 #2
0
 def _set_foreground(self, value, attrlist):
     if value not in COLOR_RGB:
         logger.info('This color is not supported => %s', value)
     color = COLOR_RGB.get(value, COLOR_RGB['black'])
     if hasattr(Pango, 'AttrForeground'):
         attrlist.change(Pango.AttrForeground(
                 color[0], color[1], color[2], 0, -1))
コード例 #3
0
ファイル: state_widget.py プロジェクト: MikeSquall/tryton
 def _set_foreground(self, value, attrlist):
     if value not in COLOR_RGB:
         logging.getLogger(__name__).info('This color is not supported' +
                                          '=> %s' % value)
     color = COLOR_RGB.get(value, COLOR_RGB['black'])
     attrlist.change(
         pango.AttrForeground(color[0], color[1], color[2], 0, -1))