Skip to content

Commit 7b24e6b

Browse files
18202781743fly602
authored andcommitted
feat: add hasInWindowBlur QML property and version dependencies
1. Added new `hasInWindowBlur` property to `DQMLGlobalObject` for QML access 2. Updated InWindowBlur component to use `hasInWindowBlur` for blur disabling 3. Updated debian/control with minimum version requirements for dtk dependencies 4. Changed copyright year to 2023-2026 Log: Added hasInWindowBlur QML property for blur availability check Influence: 1. Test hasInWindowBlur property returns correct boolean on various platforms 2. Verify InWindowBlur component disables blur when hasInWindowBlur is false 3. Test build and installation with different dtk versions 4. Verify version dependency requirements in debian/control 5. Test blur rendering behavior with software renderer 6. Verify signal emission when hasInWindowBlur changes feat: 添加 hasInWindowBlur QML 属性和版本依赖 1. 为 DQMLGlobalObject 添加了新的 hasInWindowBlur 属性供 QML 访问 2. 更新 InWindowBlur 组件使用 hasInWindowBlur 来控制模糊效果开关 3. 更新 debian/control 文件增加 dtk 依赖的最低版本要求 4. 将版权年份更新为 2023-2026 Log: 新增 hasInWindowBlur QML 属性用于检测模糊可用性 Influence: 1. 测试 hasInWindowBlur 属性在不同平台上返回正确布尔值 2. 验证当 hasInWindowBlur 为 false 时 InWindowBlur 组件正确关闭模糊效果 3. 测试不同 dtk 版本下的构建和安装 4. 验证 debian/control 中的版本依赖要求 5. 测试配合软件渲染器时模糊效果的行为 6. 验证 hasInWindowBlur 变化时信号正确发射 PMS: TASK-390117
1 parent df9e39f commit 7b24e6b

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

debian/control

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ Architecture: any
6666
Depends: ${shlibs:Depends}, ${misc:Depends},
6767
libdtk6declarative( =${binary:Version}),
6868
libdtk6core-dev,
69-
libdtk6gui-dev,
70-
libdtkcommon-dev,
69+
libdtk6gui-dev (>> 6.7.42),
70+
libdtkcommon-dev (>> 6.7.42),
7171
qt6-base-dev,
7272
qt6-declarative-dev
7373
Build-Profiles: <!nodtk6>
@@ -119,8 +119,8 @@ Architecture: any
119119
Depends: ${shlibs:Depends}, ${misc:Depends},
120120
libdtkdeclarative5( =${binary:Version}),
121121
libdtkcore-dev,
122-
libdtkgui-dev,
123-
libdtkcommon-dev,
122+
libdtkgui-dev (>> 5.7.42),
123+
libdtkcommon-dev (>> 5.7.42),
124124
qtbase5-dev,
125125
qtdeclarative5-dev
126126
Build-Profiles: <!nodtk5>

qt6/src/qml/overridable/InWindowBlur.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: LGPL-3.0-or-later
44

@@ -18,7 +18,7 @@ Item {
1818
D.BackdropBlitter {
1919
id: blitter
2020
anchors.fill: parent
21-
blitterEnabled: !D.DTK.isSoftwareRender
21+
blitterEnabled: !D.DTK.isSoftwareRender && D.DTK.hasInWindowBlur
2222

2323
MultiEffect {
2424
id: blur

src/private/dqmlglobalobject.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ bool DQMLGlobalObject::hasAnimation()
221221
return DGuiApplicationHelper::testAttribute(DGuiApplicationHelper::HasAnimations);
222222
}
223223

224+
bool DQMLGlobalObject::hasInWindowBlur()
225+
{
226+
return DGuiApplicationHelper::testAttribute(DGuiApplicationHelper::HasInWindowBlur);
227+
}
228+
224229
bool DQMLGlobalObject::isSoftwareRender()
225230
{
226231
static bool isSoftware = QQuickWindow::sceneGraphBackend() == QLatin1String("software");

src/private/dqmlglobalobject_p.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ class DQMLGlobalObject : public QObject, public DTK_CORE_NAMESPACE::DObject
120120
Q_PROPERTY(bool hasComposite READ hasComposite NOTIFY hasCompositeChanged)
121121
Q_PROPERTY(bool hasNoTitlebar READ hasNoTitlebar NOTIFY hasNoTitlebarChanged)
122122
Q_PROPERTY(bool hasAnimation READ hasAnimation NOTIFY hasAnimationChanged)
123+
Q_PROPERTY(bool hasInWindowBlur READ hasInWindowBlur NOTIFY hasInWindowBlurChanged)
123124
Q_PROPERTY(bool isSoftwareRender READ isSoftwareRender FINAL CONSTANT)
124125
Q_PROPERTY(DTK_GUI_NAMESPACE::DWindowManagerHelper::WMName windowManagerName READ windowManagerName CONSTANT)
125126
Q_PROPERTY(DTK_GUI_NAMESPACE::DGuiApplicationHelper::ColorType themeType READ themeType NOTIFY themeTypeChanged)
@@ -185,6 +186,7 @@ class DQMLGlobalObject : public QObject, public DTK_CORE_NAMESPACE::DObject
185186
bool hasComposite() const;
186187
bool hasNoTitlebar() const;
187188
static bool hasAnimation();
189+
static bool hasInWindowBlur();
188190
static bool isSoftwareRender();
189191

190192
DWindowManagerHelper::WMName windowManagerName() const;
@@ -252,6 +254,7 @@ class DQMLGlobalObject : public QObject, public DTK_CORE_NAMESPACE::DObject
252254
void hasCompositeChanged();
253255
void hasNoTitlebarChanged();
254256
void hasAnimationChanged();
257+
void hasInWindowBlurChanged();
255258
void paletteChanged();
256259
void inactivePaletteChanged();
257260
void themeTypeChanged(DTK_GUI_NAMESPACE::DGuiApplicationHelper::ColorType themeType);

0 commit comments

Comments
 (0)