예제 #1
0
    def __init__(self, tag: str, req: Requester) -> None:
        super().__init__()

        self.tag_name = tag
        self.tag = req.get_tag(tag)

        try:
            self.color = background_color([self.tag]) or '#FFEA00'
        except AttributeError:
            self.color = '#FFEA00'

        self.set_property('background', self.color)
        self.set_property('foreground', 'black')

        self.connect('event', self.on_tag)
예제 #2
0
 def task_bg_color(self, node, default_color):
     if self.config.get('bg_color_enable'):
         return colors.background_color(node.get_tags(), default_color)
     else:
         return None
예제 #3
0
 def get_task_bg_color(self, node, default_color):
     if self.config.get('bg_color_enable'):
         return colors.background_color(node.get_tags(), default_color)
     else:
         return None
 def task_bg_color(self,tags,bg):
     if self.config.get('bg_color_enable'):
         return colors.background_color(tags,bg)
     else:
         return None