From 8efba8210a4038b014633ea66ca2485d75c11109 Mon Sep 17 00:00:00 2001 From: Nick Moore Date: Thu, 28 Mar 2024 09:49:45 +1100 Subject: [PATCH] orientation for "no inputs" / "no outputs" bars --- countess/gui/icons/hbar.gif | Bin 0 -> 62 bytes countess/gui/icons/vbar.gif | Bin 0 -> 71 bytes countess/gui/tree.py | 36 ++++++++++++++++++++++-------------- 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 countess/gui/icons/hbar.gif create mode 100644 countess/gui/icons/vbar.gif diff --git a/countess/gui/icons/hbar.gif b/countess/gui/icons/hbar.gif new file mode 100644 index 0000000000000000000000000000000000000000..9c36a0bcf7ddd446c3fe90cb900a0aa5b685a1e8 GIT binary patch literal 62 zcmZ?wbhEHblwjasXkcXc&%nU8rd#nR3nLc;BZCeD5P)PDm_&Q}SDx-=SUg8$M%U}J PGVkVDKJt)bWv~VSx%3dl literal 0 HcmV?d00001 diff --git a/countess/gui/icons/vbar.gif b/countess/gui/icons/vbar.gif new file mode 100644 index 0000000000000000000000000000000000000000..a2d12046b127b3a9257c89c3ddf360826a5f8449 GIT binary patch literal 71 zcmZ?wbhEHbqg|I3mwZZ ZPq width: label_max_width = max(width // 9, 25) label_font_size = int(math.sqrt(width) / 3) @@ -530,7 +537,8 @@ def del_parent(self, parent_node, child_node): def node_changed(self, node): """Called when something external updates the node's name, status or configuration.""" - self.labels[node].update_node(node) + flipped = self.canvas.winfo_width() >= self.canvas.winfo_height() + self.labels[node].update_node(node, not flipped) def destroy(self): for node_lines in self.lines.values():