Skip to content

Commit

Permalink
chore: IsDeepinEnvironment support DDE
Browse files Browse the repository at this point in the history
add DDE env support

Issue: linuxdeepin/dtkcore#301
  • Loading branch information
kegechen committed Apr 11, 2023
1 parent 99e450c commit 6c06cf3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/kernel/dguiapplicationhelper.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

Expand Down Expand Up @@ -1601,8 +1601,10 @@ bool DGuiApplicationHelper::testAttribute(DGuiApplicationHelper::Attribute attri
return false;
}
return QString(typeid(*QGuiApplicationPrivate::platform_theme).name()).contains("QDeepinTheme");
case IsDeepinEnvironment:
return QGuiApplicationPrivate::instance()->platformIntegration()->services()->desktopEnvironment().toLower().contains("deepin");
case IsDeepinEnvironment: {
const auto &de = QGuiApplicationPrivate::instance()->platformIntegration()->services()->desktopEnvironment();
return de.toLower().contains("deepin") || !de.compare("DDE");
}
case IsSpecialEffectsEnvironment: {
return qgetenv("DTK_DISABLED_SPECIAL_EFFECTS").toInt() != 1;
}
Expand Down

0 comments on commit 6c06cf3

Please sign in to comment.