[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Handful of fixes from patacca
commit 2c1e0bc25f114d117f9d7217dc8daf9bb2cfc95e
Merge: 65bbe30 ba1bd15
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Fri Mar 11 09:15:00 2016 -0800
Handful of fixes from patacca
nyx/controller.py | 7 ++++---
nyx/panel/graph.py | 18 ++++++++++++++----
nyx/panel/header.py | 2 +-
3 files changed, 19 insertions(+), 8 deletions(-)
diff --cc nyx/panel/graph.py
index c7b9a36,86390f2..03fd8d9
--- a/nyx/panel/graph.py
+++ b/nyx/panel/graph.py
@@@ -529,6 -529,8 +530,8 @@@ class GraphPanel(panel.Panel)
if selection != -1:
self.update_interval = list(Interval)[selection]
-
++
+ self.redraw(True)
else:
return False
@@@ -584,10 -587,13 +588,13 @@@
subgraph_columns = max(subgraph_columns, attr.subgraph_width - max([len(label) for label in y_axis_labels.values()]) - 2)
axis_offset = max([len(label) for label in y_axis_labels.values()])
- self.addstr(1, x, data.header(attr.subgraph_width), curses.A_BOLD, color)
+ self.addstr(1, x, data.header(attr.subgraph_width), color, BOLD)
for x_offset, label in x_axis_labels.items():
- self.addstr(attr.subgraph_height, x + x_offset + axis_offset, label, color)
+ if attr.right_to_left:
+ self.addstr(attr.subgraph_height, x + attr.subgraph_width - x_offset, label, color)
+ else:
+ self.addstr(attr.subgraph_height, x + x_offset + axis_offset, label, color)
for y, label in y_axis_labels.items():
self.addstr(y, x, label, color)
@@@ -597,7 -603,10 +604,10 @@@
column_height = int(min(attr.subgraph_height - 2, (attr.subgraph_height - 2) * column_count / (max(1, max_bound) - min_bound)))
for row in range(column_height):
- self.addstr(attr.subgraph_height - 1 - row, x + col + axis_offset + 1, ' ', color, HIGHLIGHT)
+ if attr.right_to_left:
- self.addstr(attr.subgraph_height - 1 - row, x + attr.subgraph_width - col - 1, ' ', curses.A_STANDOUT, color)
++ self.addstr(attr.subgraph_height - 1 - row, x + attr.subgraph_width - col - 1, ' ', color, HIGHLIGHT)
+ else:
- self.addstr(attr.subgraph_height - 1 - row, x + col + axis_offset + 1, ' ', curses.A_STANDOUT, color)
++ self.addstr(attr.subgraph_height - 1 - row, x + col + axis_offset + 1, ' ', color, HIGHLIGHT)
def _get_graph_bounds(self, attr, data, subgraph_columns):
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits