summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowstheme.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-21 22:42:36 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-23 13:04:02 +0200
commita8c6958a875a6c6ad67b5741a5daa89f5340710c (patch)
tree67ed6e301af89c3f817f7bb90beacf03d164e8f3 /src/plugins/platforms/windows/qwindowstheme.cpp
parentc3e2a624fbaa63979eecfc0b9346f4b54cb65264 (diff)
Add QPlatformTheme::MenuBarFocusOnAltPressRelease
On Windows, pressing and releasing the Alt key moves focus to the menubar. This is implemented in widgets, but not in Qt Quick. Add a new theme hint so that we can make Qt behave natively on all platforms, and make the common style's respective styleHint default to the theme hint. Change-Id: I101bec56afd51e81ebb128c288f8a1e9b7efedb4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstheme.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
index 3704fce15e..eeb4ac4067 100644
--- a/src/plugins/platforms/windows/qwindowstheme.cpp
+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
@@ -558,6 +558,8 @@ QVariant QWindowsTheme::themeHint(ThemeHint hint) const
}
case MouseDoubleClickDistance:
return GetSystemMetrics(SM_CXDOUBLECLK);
+ case MenuBarFocusOnAltPressRelease:
+ return true;
default:
break;
}