Use correct parameters to query highcontrastmode on Windows
Task-number: QTBUG-113645 Change-Id: Ib400253a5589345648025c22c1487598cbefbd23 Pick-to: 6.5 Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit e5c136c1797ca9a5f4763bfe30c570f6c4faf64f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
78d7004755
commit
443a9fa2bd
@ -1107,7 +1107,11 @@ bool QWindowsTheme::queryDarkMode()
|
|||||||
|
|
||||||
bool QWindowsTheme::queryHighContrast()
|
bool QWindowsTheme::queryHighContrast()
|
||||||
{
|
{
|
||||||
return booleanSystemParametersInfo(SPI_GETHIGHCONTRAST, false);
|
HIGHCONTRAST hcf = {};
|
||||||
|
hcf.cbSize = static_cast<UINT>(sizeof(HIGHCONTRAST));
|
||||||
|
if (SystemParametersInfo(SPI_GETHIGHCONTRAST, hcf.cbSize, &hcf, FALSE))
|
||||||
|
return hcf.dwFlags & HCF_HIGHCONTRASTON;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPlatformMenuItem *QWindowsTheme::createPlatformMenuItem() const
|
QPlatformMenuItem *QWindowsTheme::createPlatformMenuItem() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user