diff --git a/etc/gcylc-themes.rc b/etc/gcylc-themes.rc index 030d2bb9215..575968b21ae 100644 --- a/etc/gcylc-themes.rc +++ b/etc/gcylc-themes.rc @@ -19,16 +19,16 @@ # * The 'retry' states are hollow (pre-running) orange (almost red) # as a failure has occurred but we're doing something about it. # * The 'waiting' state is light blue. - defaults = "color=#bbbbbb", "style=unfilled", "fontcolor=black" + defaults = "color=#bbbbbb", "style=unfilled" waiting = "color=#88c6ff" held = "color=#fe83ff" queued = "color=#dcd901" ready = "color=#a08f49" expired = "color=#000000" - submitted = "color=#a1cf25", "style=filled" + submitted = "color=#a1cf25", "style=filled", "fontcolor=black" submit-failed = "color=#ff007e", "style=filled", "fontcolor=white" - running = "color=#00c140", "style=filled" - succeeded = "color=#ada5a5", "style=filled" + running = "color=#00c140", "style=filled", "fontcolor=black" + succeeded = "color=#ada5a5", "style=filled", "fontcolor=black" failed = "color=#ff0000", "style=filled", "fontcolor=white" retrying = "color=#ff7e00" submit-retrying = "color=#fa7e00" diff --git a/lib/cylc/gui/updater_graph.py b/lib/cylc/gui/updater_graph.py index 5e44c1bc54b..14a5d1300db 100644 --- a/lib/cylc/gui/updater_graph.py +++ b/lib/cylc/gui/updater_graph.py @@ -260,16 +260,23 @@ def set_live_node_attr(self, node, id_, shape=None): state = self.state_summary[id_]['state'] else: state = self.fam_state_summary[id_]['state'] + # required theme attributes try: node.attr['style'] = 'bold,' + self.theme[state]['style'] node.attr['fillcolor'] = self.theme[state]['color'] node.attr['color'] = self.theme[state]['color'] - node.attr['fontcolor'] = self.theme[state]['fontcolor'] except KeyError: # unknown state - node.attr['style'] = 'unfilled' + node.attr['style'] = 'filled' + node.attr['fillcolor'] = 'black' node.attr['color'] = 'black' - node.attr['fontcolor'] = 'black' + node.attr['fontcolor'] = 'white' + + # optional theme attributes + theme = self.theme.get(state, {}) + for attr in ['fontcolor']: + if attr in theme: + node.attr[attr] = theme[attr] if shape: node.attr['shape'] = shape