From 74e6aa5f0c9e0385391ddffea0774ce967a6915a Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 24 Aug 2023 18:02:53 +0100 Subject: [PATCH] refactor event bindings --- src/nvda_voicemeeter/window.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 97eef3e..ab4644c 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -1,5 +1,4 @@ import logging -import time import PySimpleGUI as psg @@ -11,6 +10,8 @@ from .util import get_asio_checkbox_index, get_insert_checkbox_index logger = logging.getLogger(__name__) +psg.theme("Light Gray 2") + class Window(psg.Window): """Represents the main window of the application""" @@ -47,14 +48,7 @@ class Window(psg.Window): self[f"INSERT CHECKBOX||IN{i} 0"].bind("", "||FOCUS IN") self[f"INSERT CHECKBOX||IN{i} 1"].bind("", "||FOCUS IN") else: - self[f"INSERT CHECKBOX||IN{i} 0"].bind("", "||FOCUS IN") - self[f"INSERT CHECKBOX||IN{i} 1"].bind("", "||FOCUS IN") - self[f"INSERT CHECKBOX||IN{i} 2"].bind("", "||FOCUS IN") - self[f"INSERT CHECKBOX||IN{i} 3"].bind("", "||FOCUS IN") - self[f"INSERT CHECKBOX||IN{i} 4"].bind("", "||FOCUS IN") - self[f"INSERT CHECKBOX||IN{i} 5"].bind("", "||FOCUS IN") - self[f"INSERT CHECKBOX||IN{i} 6"].bind("", "||FOCUS IN") - self[f"INSERT CHECKBOX||IN{i} 7"].bind("", "||FOCUS IN") + [self[f"INSERT CHECKBOX||IN{i} {j}"].bind("", "||FOCUS IN") for j in range(8)] def run(self): """