Windows11Style: allow usage also on windows 10
There is no reason to limit the usage of the windows 11 style to win11 or above - it works perfectly on windows 10 when using the correct font. Change-Id: I179d2c017cdad130a134f45c2f0dfadc052a39f0 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit c9306baa825c4070e37aa46aff00aa1905bf1681) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
dd5c13d09e
commit
333a4ca7dd
@ -19,15 +19,10 @@ public:
|
||||
|
||||
QStyle *QModernWindowsStylePlugin::create(const QString &key)
|
||||
{
|
||||
bool isWin11OrAbove = QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows11;
|
||||
if (isWin11OrAbove && key.compare(QLatin1String("windows11"), Qt::CaseInsensitive) == 0) {
|
||||
if (key.compare(QLatin1String("windows11"), Qt::CaseInsensitive) == 0)
|
||||
return new QWindows11Style();
|
||||
} else if (!isWin11OrAbove && key.compare(QLatin1String("windows11"), Qt::CaseInsensitive) == 0) {
|
||||
qWarning("QWindows11Style: Style is only supported on Windows11 and above");
|
||||
if (key.compare(QLatin1String("windowsvista"), Qt::CaseInsensitive) == 0)
|
||||
return new QWindowsVistaStyle();
|
||||
} else if (key.compare(QLatin1String("windowsvista"), Qt::CaseInsensitive) == 0) {
|
||||
return new QWindowsVistaStyle();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user