From 7137067cc64520c5db0077a711a06e224bf9ad36 Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Sat, 17 Nov 2018 15:11:45 -0800 Subject: [PATCH] Shell Experience Host: Brightness button is now a plain button, not a toggle button. Re #8845. Brightness button is now a plain button, not a toggle button. Note that this control is now a slider in Windows 10 19H1 build 18277 and later. --- source/appModules/shellexperiencehost.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/appModules/shellexperiencehost.py b/source/appModules/shellexperiencehost.py index d8d9192dc3e..490c04f0469 100644 --- a/source/appModules/shellexperiencehost.py +++ b/source/appModules/shellexperiencehost.py @@ -9,10 +9,20 @@ import appModuleHandler from NVDAObjects.IAccessible import IAccessible, ContentGenericClient +from NVDAObjects.UIA import UIA +import controlTypes import ui class AppModule(appModuleHandler.AppModule): + def event_NVDAObject_init(self, obj): + if isinstance(obj, UIA): + # #8845: Brightness button in Action Center is a button, not a toggle button. + # Brightness control is now a slider in build 18277. + if obj.UIAElement.cachedAutomationID == "Microsoft.QuickAction.Brightness": + obj.role = controlTypes.ROLE_BUTTON + obj.states.discard(controlTypes.STATE_CHECKABLE) + def chooseNVDAObjectOverlayClasses(self,obj,clsList): if isinstance(obj, IAccessible): try: