From e9ca4a5b581c07a8c569806e107b4cd6b52cb806 Mon Sep 17 00:00:00 2001 From: Huy Pham <42948410+hpham@users.noreply.github.com> Date: Wed, 29 Apr 2020 16:53:06 -0700 Subject: [PATCH] Session dialog: Bold heading text so that it stands out more, allign heading text with column text --- daemon/core/gui/dialogs/sessions.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/daemon/core/gui/dialogs/sessions.py b/daemon/core/gui/dialogs/sessions.py index 6a3cf380..3671b308 100644 --- a/daemon/core/gui/dialogs/sessions.py +++ b/daemon/core/gui/dialogs/sessions.py @@ -72,12 +72,15 @@ class SessionsDialog(Dialog): show="headings", selectmode=tk.BROWSE, ) + style = ttk.Style() + heading_size = int(self.app.guiconfig["scale"] * 10) + style.configure("Treeview.Heading", font=(None, heading_size, "bold")) self.tree.grid(sticky="nsew") - self.tree.column("id", stretch=tk.YES) + self.tree.column("id", stretch=tk.YES, anchor="center") self.tree.heading("id", text="ID") - self.tree.column("state", stretch=tk.YES) + self.tree.column("state", stretch=tk.YES, anchor="center") self.tree.heading("state", text="State") - self.tree.column("nodes", stretch=tk.YES) + self.tree.column("nodes", stretch=tk.YES, anchor="center") self.tree.heading("nodes", text="Node Count") for index, session in enumerate(self.sessions): @@ -213,3 +216,5 @@ class SessionsDialog(Dialog): def on_closing(self) -> None: if self.is_start_app and messagebox.askokcancel("Exit", "Quit?", parent=self): self.click_exit() + if not self.is_start_app: + self.destroy()