Skip to content

feat: implement shadow and border protocol, disable layershell decorations by default#1126

Open
18202781743 wants to merge 1 commit into
linuxdeepin:masterfrom
18202781743:master
Open

feat: implement shadow and border protocol, disable layershell decorations by default#1126
18202781743 wants to merge 1 commit into
linuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743

Copy link
Copy Markdown
Contributor
  1. Implement SurfaceShadow and SurfaceBorder structures with Q_PROPERTY
    for QML exposure
  2. Add shadow and border properties to SurfaceWrapper, with default
    values for non-layer surfaces
  3. Update XdgShadow QML component to read shadow properties from surface
    (radius, offset, color)
  4. Update Border QML component to read border properties from surface
    (width, color)
  5. Connect Personalization signals (shadowChanged, borderChanged) to
    update SurfaceWrapper properties
  6. Disable shadow and border decorations by default for LayerShell
    surfaces (m_type != Type::Layer)
  7. Set default shadow: radius 40, offsetX 0, offsetY 10, color
    rgba(0,0,0,0.4)
  8. Set default border: width 1, color rgba(255,255,255,0.1)
  9. Fix noDecoration property inheritance in SurfaceWrapper copy
    constructor
  10. Pass surface property to XdgShadow and Border QML components for
    data binding
  11. Update createXdgShadow function signature to accept SurfaceWrapper
    parameter

Log: Implement shadow and border protocol for surfaces, disable
layershell decorations by default

Influence:

  1. Test shadow rendering for non-layer surfaces (radius, offset, color)
  2. Test border rendering for non-layer surfaces (width, color)
  3. Verify LayerShell surfaces have no decorations by default
  4. Test shadow and border property updates via Personalization interface
  5. Verify noDecoration property inheritance in surface cloning
  6. Test animations with combined shadow and border effects
  7. Verify shadows work with proxy surfaces (minimized windows, etc.)

feat: 实现阴影和边框协议,默认关闭层壳装饰

  1. 实现 SurfaceShadow 和 SurfaceBorder 结构体,包含 Q_PROPERTY 以便 QML
    使用
  2. 为 SurfaceWrapper 添加阴影和边框属性,非层壳表面使用默认值
  3. 更新 XdgShadow QML 组件,从 surface 读取阴影属性(半径、偏移、颜色)
  4. 更新 Border QML 组件,从 surface 读取边框属性(宽度、颜色)
  5. 连接 Personalization 信号(shadowChanged、borderChanged)以更新
    SurfaceWrapper 属性
  6. 默认禁用 LayerShell 表面的阴影和边框装饰(m_type != Type::Layer)
  7. 设置默认阴影:半径 40,偏移 X 0,偏移 Y 10,颜色 rgba(0,0,0,0.4)
  8. 设置默认边框:宽度 1,颜色 rgba(255,255,255,0.1)
  9. 修复 SurfaceWrapper 拷贝构造函数中的 noDecoration 属性继承
  10. 将 surface 属性传递给 XdgShadow 和 Border QML 组件以进行数据绑定
  11. 更新 createXdgShadow 函数签名,接受 SurfaceWrapper 参数

Log: 实现表面阴影和边框协议,默认关闭层壳装饰

Influence:

  1. 测试非层壳表面的阴影渲染(半径、偏移、颜色)
  2. 测试非层壳表面的边框渲染(宽度、颜色)
  3. 验证 LayerShell 表面默认无装饰
  4. 测试通过 Personalization 接口更新阴影和边框属性
  5. 验证表面克隆时的 noDecoration 属性继承
  6. 测试结合阴影和边框效果的动画
  7. 验证代理表面(最小化窗口等)的阴影效果

decorations by default

1. Implement SurfaceShadow and SurfaceBorder structures with Q_PROPERTY
for QML exposure
2. Add shadow and border properties to SurfaceWrapper, with default
values for non-layer surfaces
3. Update XdgShadow QML component to read shadow properties from surface
(radius, offset, color)
4. Update Border QML component to read border properties from surface
(width, color)
5. Connect Personalization signals (shadowChanged, borderChanged) to
update SurfaceWrapper properties
6. Disable shadow and border decorations by default for LayerShell
surfaces (m_type != Type::Layer)
7. Set default shadow: radius 40, offsetX 0, offsetY 10, color
rgba(0,0,0,0.4)
8. Set default border: width 1, color rgba(255,255,255,0.1)
9. Fix noDecoration property inheritance in SurfaceWrapper copy
constructor
10. Pass surface property to XdgShadow and Border QML components for
data binding
11. Update createXdgShadow function signature to accept SurfaceWrapper
parameter

Log: Implement shadow and border protocol for surfaces, disable
layershell decorations by default

Influence:
1. Test shadow rendering for non-layer surfaces (radius, offset, color)
2. Test border rendering for non-layer surfaces (width, color)
3. Verify LayerShell surfaces have no decorations by default
4. Test shadow and border property updates via Personalization interface
5. Verify noDecoration property inheritance in surface cloning
6. Test animations with combined shadow and border effects
7. Verify shadows work with proxy surfaces (minimized windows, etc.)

feat: 实现阴影和边框协议,默认关闭层壳装饰

1. 实现 SurfaceShadow 和 SurfaceBorder 结构体,包含 Q_PROPERTY 以便 QML
使用
2. 为 SurfaceWrapper 添加阴影和边框属性,非层壳表面使用默认值
3. 更新 XdgShadow QML 组件,从 surface 读取阴影属性(半径、偏移、颜色)
4. 更新 Border QML 组件,从 surface 读取边框属性(宽度、颜色)
5. 连接 Personalization 信号(shadowChanged、borderChanged)以更新
SurfaceWrapper 属性
6. 默认禁用 LayerShell 表面的阴影和边框装饰(m_type != Type::Layer)
7. 设置默认阴影:半径 40,偏移 X 0,偏移 Y 10,颜色 rgba(0,0,0,0.4)
8. 设置默认边框:宽度 1,颜色 rgba(255,255,255,0.1)
9. 修复 SurfaceWrapper 拷贝构造函数中的 noDecoration 属性继承
10. 将 surface 属性传递给 XdgShadow 和 Border QML 组件以进行数据绑定
11. 更新 createXdgShadow 函数签名,接受 SurfaceWrapper 参数

Log: 实现表面阴影和边框协议,默认关闭层壳装饰

Influence:
1. 测试非层壳表面的阴影渲染(半径、偏移、颜色)
2. 测试非层壳表面的边框渲染(宽度、颜色)
3. 验证 LayerShell 表面默认无装饰
4. 测试通过 Personalization 接口更新阴影和边框属性
5. 验证表面克隆时的 noDecoration 属性继承
6. 测试结合阴影和边框效果的动画
7. 验证代理表面(最小化窗口等)的阴影效果

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@18202781743

Copy link
Copy Markdown
Contributor Author

@wineee @Groveer


if (m_type == Type::Layer) {
if (m_shadow.radius > 0 && m_noDecoration)
setNoDecoration(false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setNoDecoration 有专门协议控制,不可以随意改


if (m_type == Type::Layer) {
if (m_border.width > 0 && m_noDecoration)
setNoDecoration(false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants