voicemeeter-compact/vmcompact/banner.py
onyx-and-iris 76ca376bfc changes to banner frame, nav frame and config frames.
only create a banner frame for potato version (since it hold info about submixes).

stick nav_frame eastwards.

change columnspan for bus config frame to 4 to match strip config frames.
2022-04-22 01:27:35 +01:00

35 lines
956 B
Python

import tkinter as tk
from tkinter import ttk
from .data import _base_vals
class Banner(ttk.Frame):
def __init__(self, parent):
super().__init__()
self._parent = parent
self.submix = tk.StringVar()
self.submix.set(self.target.bus[_base_vals.submixes].label)
self.label = ttk.Label(
self,
text=f"SUBMIX: {self.submix.get().upper()}",
)
self.label.grid(column=0, row=0, sticky=(tk.N, tk.S, tk.W, tk.E))
self.upd_submix()
@property
def target(self):
"""use the correct interface"""
return self._parent.target
def upd_submix(self):
self.after(1, self.upd_submix_step)
def upd_submix_step(self):
if not _base_vals.dragging:
self.submix.set(self.target.bus[_base_vals.submixes].label)
self.label["text"] = f"SUBMIX: {self.submix.get().upper()}"
self.after(100, self.upd_submix_step)