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