mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2025-01-18 04:10:46 +00:00
channel_xpadding and navigation_show added to data.
app.toml example now includes channel padding and nav show [channel] xpadding and [navigation] show added to app.toml delay parameter updates if gui needed launching
This commit is contained in:
parent
2ec1c74b7d
commit
1e3751b19f
@ -13,9 +13,13 @@ extends_horizontal=true
|
||||
[channel]
|
||||
width = 80
|
||||
height = 130
|
||||
xpadding = 2
|
||||
# size of a single mouse wheel scroll step
|
||||
[mwscroll_step]
|
||||
size = 3
|
||||
# default submix bus
|
||||
[submixes]
|
||||
default = 0
|
||||
# show the navigation frame?
|
||||
[navigation]
|
||||
show = true
|
||||
|
@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import tkinter as tk
|
||||
from functools import cached_property
|
||||
from pathlib import Path
|
||||
@ -11,6 +12,8 @@ from .errors import VMCompactError
|
||||
from .menu import Menus
|
||||
from .subject import Subject
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class App(tk.Tk):
|
||||
"""App mainframe"""
|
||||
@ -34,9 +37,10 @@ class App(tk.Tk):
|
||||
|
||||
def __init__(self, vmr):
|
||||
super().__init__()
|
||||
|
||||
self.logger = logger.getChild(self.__class__.__name__)
|
||||
self._vmr = vmr
|
||||
self._vmr.event.add(["pdirty", "ldirty"])
|
||||
self.after(12000 if not self._vmr.gui.initial_state else 1, self.start_updates)
|
||||
self._vmr.init_thread()
|
||||
icon_path = Path(__file__).parent.resolve() / "img" / "cat.ico"
|
||||
if icon_path.is_file():
|
||||
@ -54,6 +58,10 @@ class App(tk.Tk):
|
||||
self.drag_id = ""
|
||||
self.bind("<Configure>", self.dragging)
|
||||
|
||||
def start_updates(self):
|
||||
self.logger.debug("updates started")
|
||||
_base_values.run_update = True
|
||||
|
||||
def __str__(self):
|
||||
return f"{type(self).__name__}App"
|
||||
|
||||
|
@ -48,6 +48,7 @@ _defaults = {
|
||||
"channel": {
|
||||
"width": 80,
|
||||
"height": 130,
|
||||
"xpadding": 3,
|
||||
},
|
||||
"mwscroll_step": {
|
||||
"size": 3,
|
||||
@ -55,6 +56,7 @@ _defaults = {
|
||||
"submixes": {
|
||||
"default": 0,
|
||||
},
|
||||
"navigation": {"show": True},
|
||||
}
|
||||
|
||||
if "app" in configuration:
|
||||
|
@ -32,10 +32,15 @@ class Configurations(metaclass=SingletonMeta):
|
||||
# bus assigned as current submix
|
||||
submixes: int = configuration["submixes"]["default"]
|
||||
|
||||
# width of a single labelframe
|
||||
level_width: int = configuration["channel"]["width"]
|
||||
# height of a single labelframe
|
||||
level_height: int = configuration["channel"]["height"]
|
||||
# width of a single channel labelframe
|
||||
channel_width: int = configuration["channel"]["width"]
|
||||
# height of a single channel labelframe
|
||||
channel_height: int = configuration["channel"]["height"]
|
||||
# xpadding for a single channel labelframe
|
||||
channel_xpadding: int = configuration["channel"]["xpadding"]
|
||||
|
||||
# do we grid the navigation frame?
|
||||
navigation_show: bool = configuration["navigation"]["show"]
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
@ -46,7 +51,7 @@ class Configurations(metaclass=SingletonMeta):
|
||||
@dataclass
|
||||
class BaseValues(metaclass=SingletonMeta):
|
||||
# pause updates after releasing scale
|
||||
run_update: bool = True
|
||||
run_update: bool = False
|
||||
# are we dragging main window with mouse 1
|
||||
dragging: bool = False
|
||||
# a vban connection established
|
||||
|
Loading…
Reference in New Issue
Block a user