xpadding on channels

may be configured through app.toml
This commit is contained in:
onyx-and-iris 2023-06-29 15:50:39 +01:00
parent 5ab1fd7102
commit 0a19e28370
3 changed files with 13 additions and 12 deletions

View File

@ -195,9 +195,9 @@ class NavigationFrameBuilder(AbstractBuilder):
if isinstance(child, ttk.Checkbutton)
]
if _configuration.themes_enabled:
self.navframe.rowconfigure(1, minsize=_configuration.level_height)
self.navframe.rowconfigure(1, minsize=_configuration.channel_height)
else:
self.navframe.rowconfigure(1, minsize=_configuration.level_height + 10)
self.navframe.rowconfigure(1, minsize=_configuration.channel_height + 10)
def teardown(self):
pass
@ -243,7 +243,7 @@ class ChannelLabelFrameBuilder(AbstractBuilder):
orient="vertical",
variable=self.labelframe.gain,
command=self.labelframe.scale_callback,
length=_configuration.level_height,
length=_configuration.channel_height,
)
self.scale.grid(column=1, row=0)
self.scale.bind("<Double-Button-1>", self.labelframe.reset_gain)
@ -324,7 +324,7 @@ class ChannelConfigFrameBuilder(AbstractBuilder):
]
self.configframe.grid(sticky=(tk.W))
[
self.configframe.columnconfigure(i, minsize=_configuration.level_width)
self.configframe.columnconfigure(i, minsize=_configuration.channel_width)
for i in range(self.configframe.phys_out + self.configframe.virt_out)
]
@ -392,7 +392,7 @@ class StripConfigFrameBuilder(ChannelConfigFrameBuilder):
from_=0.0,
to=10.0,
orient="horizontal",
length=_configuration.level_width,
length=_configuration.channel_width,
variable=self.configframe.slider_vars[
self.configframe.slider_params.index("comp.knob")
],
@ -416,7 +416,7 @@ class StripConfigFrameBuilder(ChannelConfigFrameBuilder):
from_=0.0,
to=10.0,
orient="horizontal",
length=_configuration.level_width,
length=_configuration.channel_width,
variable=self.configframe.slider_vars[
self.configframe.slider_params.index("gate.knob")
],
@ -440,7 +440,7 @@ class StripConfigFrameBuilder(ChannelConfigFrameBuilder):
from_=-40,
to=12,
orient="horizontal",
length=_configuration.level_width,
length=_configuration.channel_width,
variable=self.configframe.slider_vars[
self.configframe.slider_params.index("limit")
],
@ -464,7 +464,7 @@ class StripConfigFrameBuilder(ChannelConfigFrameBuilder):
from_=0.0,
to=10.0,
orient="horizontal",
length=_configuration.level_width,
length=_configuration.channel_width,
variable=self.configframe.slider_vars[
self.configframe.slider_params.index("audibility")
],

View File

@ -154,7 +154,7 @@ class ChannelLabelFrame(ttk.LabelFrame):
self.configure(text=retval)
def grid_configure(self):
self.grid(sticky=(tk.N, tk.S))
self.grid(padx=_configuration.channel_xpadding, sticky=(tk.N, tk.S))
[
child.grid_configure(padx=1, pady=1, sticky=(tk.W, tk.E))
for child in self.winfo_children()
@ -258,7 +258,7 @@ class ChannelFrame(ttk.Frame):
def grid_configure(self):
[
self.columnconfigure(i, minsize=_configuration.level_width)
self.columnconfigure(i, minsize=_configuration.channel_width)
for i, _ in enumerate(self.labelframes)
]
[self.rowconfigure(0, minsize=100) for i, _ in enumerate(self.labelframes)]

View File

@ -166,6 +166,7 @@ class GainLayer(ttk.LabelFrame):
)
def grid_configure(self):
self.grid(padx=_configuration.channel_xpadding, sticky=(tk.N, tk.S))
[
child.grid_configure(padx=1, pady=1, sticky=(tk.N, tk.S, tk.W, tk.E))
for child in self.winfo_children()
@ -253,11 +254,11 @@ class SubMixFrame(ttk.Frame):
def grid_configure(self):
[
self.columnconfigure(i, minsize=_configuration.level_width)
self.columnconfigure(i, minsize=_configuration.channel_width)
for i, _ in enumerate(self.labelframes)
]
[
self.rowconfigure(0, minsize=_configuration.level_height)
self.rowconfigure(0, minsize=_configuration.channel_height)
for i, _ in enumerate(self.labelframes)
]