From b5353615668a8b3c1e26adead7cb9d5ad4abcd9a Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周五, 22 12月 2023 23:21:07 +0800
Subject: [PATCH] minor tweaks

---
 src/core/shared/qwkwindowsextra_p.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/core/shared/qwkwindowsextra_p.h b/src/core/shared/qwkwindowsextra_p.h
index 03adf7e..baddc07 100644
--- a/src/core/shared/qwkwindowsextra_p.h
+++ b/src/core/shared/qwkwindowsextra_p.h
@@ -19,6 +19,7 @@
 #include <QtCore/private/qsystemlibrary_p.h>
 #include <QtCore/private/qwinregistry_p.h>
 
+#include <QtGui/QGuiApplication>
 #include <QtGui/QStyleHints>
 #include <QtGui/QPalette>
 
@@ -293,6 +294,11 @@
         return result;
     }
 
+    static inline bool isWin101809OrGreater() {
+        static const bool result = IsWindows101809OrGreater_Real();
+        return result;
+    }
+
     static inline bool isWin11OrGreater() {
         static const bool result = IsWindows11OrGreater_Real();
         return result;
@@ -327,6 +333,13 @@
         return value.first;
     }
 
+    static inline bool isHighContrastModeEnabled() {
+        HIGHCONTRASTW hc{};
+        hc.cbSize = sizeof(hc);
+        ::SystemParametersInfoW(SPI_GETHIGHCONTRAST, sizeof(hc), &hc, FALSE);
+        return (hc.dwFlags & HCF_HIGHCONTRASTON);
+    }
+
     static inline bool isDarkThemeActive() {
 #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
         return QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark;

--
Gitblit v1.9.1