High Contrast theme added.

Sets GUI font to Arial, size 14

version bumped to 0.5.7b2

Issue #19
This commit is contained in:
2023-11-19 01:22:40 +00:00
parent 36003fe73f
commit 64361b2011
6 changed files with 65 additions and 5 deletions

View File

@@ -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(