Skip to content

fix: window corner radius setting not taking effect#1022

Draft
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/corner-radius
Draft

fix: window corner radius setting not taking effect#1022
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/corner-radius

Conversation

@deepin-wm

Copy link
Copy Markdown
Contributor

Use -1 as sentinel value to distinguish "never set" from "explicitly set" for per-window cornerRadius, and reset per-window overrides when DConfig windowRadius changes.

Changes

  1. Use -1 as sentinel value for per-window cornerRadius in SurfaceWrapper and PersonalizationWindowContextV1
  2. Reset per-window m_radius override to -1 when DConfig windowRadius changes
  3. Fix Layer type windows returning -1.0 instead of 0 when no per-window override is set
  4. Add resetCornerRadius() method with early-return guard

Testing

  • Test window corner radius change via control center
  • Verify existing windows update radius in real-time
  • Test Layer windows do not show rounded corners

PMS: BUG-2500U1-271537

1. Use -1 as sentinel value to distinguish "never set" from
   "explicitly set" for per-window cornerRadius in both
   SurfaceWrapper and PersonalizationWindowContextV1
2. Reset per-window m_radius override to -1 when DConfig
   windowRadius changes, so radius() falls back to the new
   global value
3. Fix Layer type windows returning -1.0 instead of 0 when
   no per-window override is set
4. Add resetCornerRadius() method with early-return guard

Influence:
1. Test window corner radius change via control center
2. Verify existing windows update radius in real-time
3. Test Layer windows do not show rounded corners

fix: 窗口圆角设置不生效

1. 使用 -1 作为哨兵值区分"从未设置"和"显式设置"逐窗口
   圆角半径,适用于 SurfaceWrapper 和
   PersonalizationWindowContextV1
2. 当 DConfig windowRadius 变更时,将逐窗口 m_radius 覆盖
   值重置为 -1,使 radius() 回退到新的全局值
3. 修复 Layer 类型窗口在无逐窗口覆盖时返回 -1.0 而非 0
4. 添加 resetCornerRadius() 方法,包含提前返回守卫

Influence:
1. 测试通过控制中心修改窗口圆角
2. 验证已存在窗口实时更新圆角
3. 测试 Layer 窗口不显示圆角

PMS: BUG-2500U1-271537

@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 @deepin-wm, 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

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm

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

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.

2 participants