Skip to content

Commit

Permalink
Address feedback: default theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Nov 24, 2018
1 parent 021039c commit 5c203f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
8 changes: 4 additions & 4 deletions etc/gcylc-themes.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 10 additions & 3 deletions lib/cylc/gui/updater_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c203f1

Please sign in to comment.