From 76ca376bfc55153fb1b0a76e76f2f0c97c7275ac Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Fri, 22 Apr 2022 01:27:35 +0100 Subject: [PATCH] changes to banner frame, nav frame and config frames. only create a banner frame for potato version (since it hold info about submixes). stick nav_frame eastwards. change columnspan for bus config frame to 4 to match strip config frames. --- vmcompact/app.py | 9 +++++---- vmcompact/banner.py | 17 +++++++---------- vmcompact/channels.py | 4 ++-- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/vmcompact/app.py b/vmcompact/app.py index c8748db..15bb953 100644 --- a/vmcompact/app.py +++ b/vmcompact/app.py @@ -152,19 +152,20 @@ class App(tk.Tk): self.channel_frame.grid(row=0, column=0, sticky=(tk.W)) # separator self.sep = ttk.Separator(self, orient="vertical") - self.sep.grid(row=0, column=1, sticky=(tk.S, tk.N)) + self.sep.grid(row=0, column=1, sticky=(tk.N, tk.S)) self.columnconfigure(1, minsize=15) # navigation frame self.nav_frame = Navigation(self) - self.nav_frame.grid(row=0, column=3) + self.nav_frame.grid(row=0, column=3, sticky=(tk.E)) if self.configuration["extends"]["extended"]: self.nav_frame.extend.set(True) self.nav_frame.extend_frame() - self.banner = Banner(self) - self.banner.grid(row=4, column=0, columnspan=3) + if self.kind.name == "Potato": + self.banner = Banner(self) + self.banner.grid(row=4, column=0, columnspan=3) def _destroy_top_level_frames(self): [ diff --git a/vmcompact/banner.py b/vmcompact/banner.py index d9dfb7a..477a285 100644 --- a/vmcompact/banner.py +++ b/vmcompact/banner.py @@ -8,19 +8,16 @@ class Banner(ttk.Frame): def __init__(self, parent): super().__init__() self._parent = parent - self.web = "onyxandiris.online" self.submix = tk.StringVar() - if self._parent.kind.name == "Potato": - self.submix.set(self.target.bus[_base_vals.submixes].label) + self.submix.set(self.target.bus[_base_vals.submixes].label) - if self._parent.kind.name == "Potato": - self.label = ttk.Label( - self, - text=f"SUBMIX: {self.submix.get().upper()}", - ) - self.label.grid(column=0, row=0, sticky=(tk.N, tk.S, tk.W, tk.E)) + self.label = ttk.Label( + self, + text=f"SUBMIX: {self.submix.get().upper()}", + ) + self.label.grid(column=0, row=0, sticky=(tk.N, tk.S, tk.W, tk.E)) - self.upd_submix() + self.upd_submix() @property def target(self): diff --git a/vmcompact/channels.py b/vmcompact/channels.py index 2fa268b..fc4b540 100644 --- a/vmcompact/channels.py +++ b/vmcompact/channels.py @@ -276,9 +276,9 @@ class Bus(Channel): self.identifier, ) if _base_vals.extends_horizontal: - self.config_frame.grid(column=0, row=1, columnspan=3) + self.config_frame.grid(column=0, row=1, columnspan=4) else: - self.config_frame.grid(column=0, row=3, columnspan=3) + self.config_frame.grid(column=0, row=3, columnspan=4) self._parent._parent.channel_frame.reset_config_buttons(self) self._parent._parent.bus_frame.reset_config_buttons(self) else: