mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2026-04-17 14:53:32 +00:00
High Contrast theme added.
Sets GUI font to Arial, size 14 version bumped to 0.5.7b2 Issue #19
This commit is contained in:
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
|
||||
from .errors import NVDAVMError
|
||||
|
||||
bits = 64 if ct.sizeof(ct.c_voidp) == 8 else 32
|
||||
bits = 64 if ct.sizeof(ct.c_void_p) == 8 else 32
|
||||
|
||||
if platform.system() != "Windows":
|
||||
raise NVDAVMError("Only Windows OS supported")
|
||||
|
||||
@@ -13,7 +13,10 @@ class LabelSlider(psg.Frame):
|
||||
if param in ("AUDIBILITY", "DENOISER"):
|
||||
size = 7
|
||||
else:
|
||||
size = 4
|
||||
if psg.theme() == "HighContrast":
|
||||
size = 5
|
||||
else:
|
||||
size = 4
|
||||
layout = [
|
||||
[
|
||||
psg.Text(param.capitalize(), size=size),
|
||||
|
||||
@@ -200,6 +200,23 @@ def _get_bus_assignments(kind) -> list:
|
||||
return [f"A{i}" for i in range(1, kind.phys_out + 1)] + [f"B{i}" for i in range(1, kind.virt_out + 1)]
|
||||
|
||||
|
||||
psg.theme_add_new(
|
||||
"HighContrast",
|
||||
{
|
||||
"BACKGROUND": "#FFFFFF",
|
||||
"TEXT": "#000000",
|
||||
"INPUT": "#FAF9F6",
|
||||
"TEXT_INPUT": "#000000",
|
||||
"SCROLL": "#FAF9F6",
|
||||
"BUTTON": ("#000000", "#FFFFFF"),
|
||||
"PROGRESS": ("#000000", "#FFFFFF"),
|
||||
"BORDER": 2,
|
||||
"SLIDER_DEPTH": 3,
|
||||
"PROGRESS_DEPTH": 0,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def get_themes_list() -> list:
|
||||
return [
|
||||
"Bright Colors",
|
||||
@@ -221,4 +238,5 @@ def get_themes_list() -> list:
|
||||
"Neutral Blue",
|
||||
"Reds",
|
||||
"Sandy Beach",
|
||||
"High Contrast",
|
||||
]
|
||||
|
||||
@@ -13,6 +13,8 @@ from .popup import Popup
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
psg.theme(configuration.get("default_theme", "Dark Blue 3"))
|
||||
if psg.theme() == "HighContrast":
|
||||
psg.set_options(font=("Arial", 14))
|
||||
|
||||
|
||||
class NVDAVMWindow(psg.Window):
|
||||
@@ -22,6 +24,7 @@ class NVDAVMWindow(psg.Window):
|
||||
self.vm = vm
|
||||
self.kind = self.vm.kind
|
||||
self.logger = logger.getChild(type(self).__name__)
|
||||
self.logger.debug(f"loaded with theme: {psg.theme()}")
|
||||
self.cache = {
|
||||
"hw_ins": models._make_hardware_ins_cache(self.vm),
|
||||
"hw_outs": models._make_hardware_outs_cache(self.vm),
|
||||
@@ -65,7 +68,7 @@ class NVDAVMWindow(psg.Window):
|
||||
if settings_path.exists():
|
||||
try:
|
||||
defaultconfig = Path(configuration.get("default_config", "")) # coerce the type
|
||||
if defaultconfig.exists():
|
||||
if defaultconfig.is_file() and defaultconfig.exists():
|
||||
self.vm.set("command.load", str(defaultconfig))
|
||||
self.logger.debug(f"config {defaultconfig} loaded")
|
||||
self.TKroot.after(
|
||||
|
||||
Reference in New Issue
Block a user