pygui: initial canvas manager with a single tab by default, updates to how throughputs are handled related to canvases

This commit is contained in:
Blake Harnden 2020-12-17 14:31:09 -08:00
parent 2f9c169e66
commit f9a4fe3331
8 changed files with 59 additions and 61 deletions

View file

@ -357,9 +357,9 @@ class CanvasEdge(Edge):
throughput = 0.001 * throughput
text = f"{throughput:.3f} kbps"
self.middle_label_text(text)
if throughput > self.canvas.throughput_threshold:
color = self.canvas.throughput_color
width = self.canvas.throughput_width
if throughput > self.canvas.manager.throughput_threshold:
color = self.canvas.manager.throughput_color
width = self.canvas.manager.throughput_width
else:
color = self.color
width = self.scaled_width()