add profiles to defaults, add minsize.

changes to menus.
vban menu text changed

themes menu reworked. now using set_theme not toggle.
This commit is contained in:
onyx-and-iris
2022-05-05 11:08:23 +01:00
parent 477c0a1520
commit cd64693c15
2 changed files with 50 additions and 51 deletions

View File

@@ -35,6 +35,9 @@ class App(tk.Tk):
def __init__(self, vmr):
super().__init__()
defaults = {
"profiles": {
"profile": None,
},
"theme": {
"enabled": True,
"mode": "light",
@@ -69,8 +72,14 @@ class App(tk.Tk):
"vban": list(tk.StringVar(value="normal") for _ in range(8)),
}
if (
"profiles" in self.configuration
and self.configuration["profiles"]["profile"]
):
vmr.apply_profile(self.configuration["profiles"]["profile"])
# create menus
self.menus = Menus(self, vmr)
self["menu"] = Menus(self, vmr)
self.styletable = ttk.Style()
self._vmr = vmr
@@ -90,6 +99,8 @@ class App(tk.Tk):
self.iconbitmap(Path(__file__).parent.resolve() / "img" / "cat.ico")
self.minsize(400, False)
@property
def target(self):
"""returns the current interface"""