gain labels added to submix frame

patch bump
This commit is contained in:
onyx-and-iris 2022-05-14 16:00:58 +01:00
parent 502110ae0f
commit 6fe73015ce
3 changed files with 9 additions and 7 deletions

View File

@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setuptools.setup( setuptools.setup(
name="vmcompact", name="vmcompact",
version="1.2.2", version="1.2.3",
author="Onyx and Iris", author="Onyx and Iris",
author_email="code@onyxandiris.online", author_email="code@onyxandiris.online",
description="Compact Tkinter Voicemeeter Remote App", description="Compact Tkinter Voicemeeter Remote App",

View File

@ -182,7 +182,7 @@ class NavigationFrameBuilder(AbstractBuilder):
if isinstance(child, ttk.Checkbutton) if isinstance(child, ttk.Checkbutton)
] ]
if _configuration.themes_enabled: if _configuration.themes_enabled:
self.navframe.rowconfigure(1, minsize=_configuration.level_height - 16) self.navframe.rowconfigure(1, minsize=_configuration.level_height)
else: else:
self.navframe.rowconfigure(1, minsize=_configuration.level_height - 5) self.navframe.rowconfigure(1, minsize=_configuration.level_height - 5)
@ -276,7 +276,7 @@ class ChannelLabelFrameBuilder(AbstractBuilder):
style=f"{'Toggle.TButton' if _configuration.themes_enabled else f'{self.identifier}On{self.index}.TButton'}", style=f"{'Toggle.TButton' if _configuration.themes_enabled else f'{self.identifier}On{self.index}.TButton'}",
variable=self.labelframe.on, variable=self.labelframe.on,
) )
self.button_on.grid(column=0, row=1, columnspan=2) self.button_on.grid(column=0, row=2, columnspan=2)
def teardown(self): def teardown(self):
self.labelframe.grid_remove() self.labelframe.grid_remove()

View File

@ -24,6 +24,7 @@ class GainLayer(ttk.LabelFrame):
self.builder.setup() self.builder.setup()
self.builder.add_progressbar() self.builder.add_progressbar()
self.builder.add_scale() self.builder.add_scale()
self.builder.add_gain_label()
self.builder.add_on_button() self.builder.add_on_button()
self.sync() self.sync()
self.grid_configure() self.grid_configure()
@ -50,13 +51,13 @@ class GainLayer(ttk.LabelFrame):
def reset_gain(self, *args): def reset_gain(self, *args):
self.setter("gain", 0) self.setter("gain", 0)
self.gain.set(0) self.gain.set(0)
self.parent.parent.nav_frame.info_text.set(0) self.gainlabel.set(0)
def scale_callback(self, *args): def scale_callback(self, *args):
"""callback function for scale widget""" """callback function for scale widget"""
self.setter("gain", self.gain.get()) self.setter("gain", self.gain.get())
self.parent.parent.nav_frame.info_text.set(round(self.gain.get(), 1)) self.gainlabel.set(round(self.gain.get(), 1))
def scale_press(self, *args): def scale_press(self, *args):
_base_values.in_scale_button_1 = True _base_values.in_scale_button_1 = True
@ -106,6 +107,7 @@ class GainLayer(ttk.LabelFrame):
def sync_params(self): def sync_params(self):
self.gain.set(self.getter("gain")) self.gain.set(self.getter("gain"))
self.gainlabel.set(round(self.gain.get(), 1))
self.on.set( self.on.set(
getattr( getattr(
self.parent.target.strip[self.index], self.parent.target.strip[self.index],
@ -184,9 +186,9 @@ class GainLayer(ttk.LabelFrame):
self.columnconfigure(1, minsize=36) self.columnconfigure(1, minsize=36)
# on button # on button
if _configuration.themes_enabled: if _configuration.themes_enabled:
self.rowconfigure(1, minsize=70) self.rowconfigure(2, minsize=70)
else: else:
self.rowconfigure(1, minsize=55) self.rowconfigure(2, minsize=55)
class SubMixFrame(ttk.Frame): class SubMixFrame(ttk.Frame):