mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2024-11-15 17:40:52 +00:00
mousewheel scroll step now settable
size of mousewheel scroll step now settable add _base_vals.mwscroll_step to data. added [mwscroll_step] to app.toml
This commit is contained in:
parent
99275d1dd2
commit
000b18b6ec
@ -1,7 +1,6 @@
|
|||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import ttk
|
from tkinter import ttk
|
||||||
from typing import NamedTuple
|
from typing import NamedTuple
|
||||||
from functools import partial
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from .errors import VMCompactErrors
|
from .errors import VMCompactErrors
|
||||||
@ -47,6 +46,9 @@ class App(tk.Tk):
|
|||||||
"width": 80,
|
"width": 80,
|
||||||
"height": 130,
|
"height": 130,
|
||||||
},
|
},
|
||||||
|
"mwscroll_step": {
|
||||||
|
"size": 3,
|
||||||
|
},
|
||||||
"submixes": {
|
"submixes": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
},
|
},
|
||||||
@ -60,6 +62,8 @@ class App(tk.Tk):
|
|||||||
"extends_horizontal"
|
"extends_horizontal"
|
||||||
]
|
]
|
||||||
_base_vals.submixes = self.configuration["submixes"]["default"]
|
_base_vals.submixes = self.configuration["submixes"]["default"]
|
||||||
|
_base_vals.mwscroll_step = self.configuration["mwscroll_step"]["size"]
|
||||||
|
|
||||||
# create menus
|
# create menus
|
||||||
self.menus = Menus(self, vmr)
|
self.menus = Menus(self, vmr)
|
||||||
self.styletable = ttk.Style()
|
self.styletable = ttk.Style()
|
||||||
|
@ -73,10 +73,14 @@ class Channel(ttk.LabelFrame):
|
|||||||
_base_vals.in_scale_button_1 = False
|
_base_vals.in_scale_button_1 = False
|
||||||
|
|
||||||
def _on_mousewheel(self, event):
|
def _on_mousewheel(self, event):
|
||||||
if event.delta > 0:
|
self.gain.set(
|
||||||
self.gain.set(self.gain.get() + 3)
|
self.gain.get()
|
||||||
else:
|
+ (
|
||||||
self.gain.set(self.gain.get() - 3)
|
_base_vals.mwscroll_step
|
||||||
|
if event.delta > 0
|
||||||
|
else -_base_vals.mwscroll_step
|
||||||
|
)
|
||||||
|
)
|
||||||
if self.gain.get() > 12:
|
if self.gain.get() > 12:
|
||||||
self.gain.set(12)
|
self.gain.set(12)
|
||||||
elif self.gain.get() < -60:
|
elif self.gain.get() < -60:
|
||||||
|
18
vmcompact/configs/app.toml
Normal file
18
vmcompact/configs/app.toml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# load with themes enabled? set the default mode
|
||||||
|
[theme]
|
||||||
|
enabled=true
|
||||||
|
mode="light"
|
||||||
|
# load in extended mode? if so which orientation
|
||||||
|
[extends]
|
||||||
|
extended=true
|
||||||
|
extends_horizontal=true
|
||||||
|
# default dimensions for channel label frames
|
||||||
|
[channel]
|
||||||
|
width=80
|
||||||
|
height=130
|
||||||
|
# size of a single mouse wheen scroll step
|
||||||
|
[mwscroll_step]
|
||||||
|
size=3
|
||||||
|
# default submix bus
|
||||||
|
[submixes]
|
||||||
|
default=6
|
12
vmcompact/configs/vban.toml
Normal file
12
vmcompact/configs/vban.toml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# example connections
|
||||||
|
[connection-1]
|
||||||
|
kind = 'banana'
|
||||||
|
ip = '<ip address 1>'
|
||||||
|
streamname = 'Command1'
|
||||||
|
port = 6990
|
||||||
|
|
||||||
|
[connection-2]
|
||||||
|
kind = 'potato'
|
||||||
|
ip = '<ip address 2>'
|
||||||
|
streamname = 'Command1'
|
||||||
|
port = 6990
|
@ -29,6 +29,8 @@ class BaseValues:
|
|||||||
strip_level_array_size: int = None
|
strip_level_array_size: int = None
|
||||||
# size of bus level array for a kind
|
# size of bus level array for a kind
|
||||||
bus_level_array_size: int = None
|
bus_level_array_size: int = None
|
||||||
|
# size of mousewheel scroll step
|
||||||
|
mwscroll_step: int = 3
|
||||||
|
|
||||||
|
|
||||||
_base_vals = BaseValues()
|
_base_vals = BaseValues()
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import ttk, messagebox as msg
|
from tkinter import ttk
|
||||||
from functools import partial
|
|
||||||
from math import log
|
from math import log
|
||||||
|
|
||||||
from .data import _base_vals
|
from .data import _base_vals
|
||||||
@ -62,10 +61,14 @@ class GainLayer(ttk.LabelFrame):
|
|||||||
_base_vals.in_scale_button_1 = False
|
_base_vals.in_scale_button_1 = False
|
||||||
|
|
||||||
def _on_mousewheel(self, event):
|
def _on_mousewheel(self, event):
|
||||||
if event.delta > 0:
|
self.gain.set(
|
||||||
self.gain.set(self.gain.get() + 3)
|
self.gain.get()
|
||||||
else:
|
+ (
|
||||||
self.gain.set(self.gain.get() - 3)
|
_base_vals.mwscroll_step
|
||||||
|
if event.delta > 0
|
||||||
|
else -_base_vals.mwscroll_step
|
||||||
|
)
|
||||||
|
)
|
||||||
if self.gain.get() > 12:
|
if self.gain.get() > 12:
|
||||||
self.gain.set(12)
|
self.gain.set(12)
|
||||||
elif self.gain.get() < -60:
|
elif self.gain.get() < -60:
|
||||||
|
Loading…
Reference in New Issue
Block a user