feat: add border and shadow support for TreeLand windows#393
Conversation
There was a problem hiding this comment.
Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review★ 总体评分:85分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 在 dtreelandplatformwindowinterface.h 的 DTreeLandPlatformWindowHelper 类 private 区域添加模板辅助函数
private:
template<typename T>
void updateFeature(T &member, const T &value, Feature flag) {
if (member == value)
return;
member = value;
m_initialized |= flag;
m_dirty |= flag;
scheduleApply();
}
// 在 dtreelandplatformwindowinterface.cpp 中简化设置函数实现
void DTreeLandPlatformWindowHelper::setBorderWidth(int borderWidth)
{
updateFeature(m_borderWidth, borderWidth, Border);
}
void DTreeLandPlatformWindowHelper::setBorderColor(const QColor &borderColor)
{
updateFeature(m_borderColor, borderColor, Border);
}
void DTreeLandPlatformWindowHelper::setShadowRadius(int shadowRadius)
{
updateFeature(m_shadowRadius, shadowRadius, Shadow);
}
void DTreeLandPlatformWindowHelper::setShadowOffset(const QPoint &shadowOffset)
{
updateFeature(m_shadowOffset, shadowOffset, Shadow);
}
void DTreeLandPlatformWindowHelper::setShadowColor(const QColor &shadowColor)
{
updateFeature(m_shadowColor, shadowColor, Shadow);
} |
Implement border width/color and shadow radius/offset/color for TreeLand platform windows. Refactor the personalization window protocol to use a unified dirty-flag schedule/apply pattern instead of immediate per- feature calls. This ensures all window decorations are applied together after surface creation or property changes. Log: Added window border and shadow customization for TreeLand Influence: 1. Test setting border width and color, verify visual appearance 2. Test setting shadow radius, offset, and color, verify correct rendering 3. Test enabling/disabling no-titlebar mode with borders and shadows 4. Verify that changing multiple properties at once triggers correct apply 5. Test window resize and surface recreation scenarios for persistence 6. Verify API backward compatibility: existing radius and blur functions still work feat: 为 Treeland 窗口添加边框和阴影支持 实现边框宽度/颜色和阴影半径/偏移/颜色。重构个性化窗口协议,使用统一的脏 标志调度/应用模式替代旧的即时逐特性调用。确保所有窗口装饰在表面创建或属 性更改后一起应用。 Log: 新增窗口边框和阴影定制功能 Influence: 1. 测试设置边框宽度和颜色,验证视觉效果 2. 测试设置阴影半径、偏移和颜色,验证正确渲染 3. 测试在启用/禁用无标题栏模式下边框和阴影的表现 4. 验证同时更改多个属性会触发正确的应用 5. 测试窗口大小变化和表面重建场景的持久性 6. 验证 API 向后兼容性:原有的圆角和模糊功能仍然正常工作
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, BLumia The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Implement border width/color and shadow radius/offset/color for TreeLand
platform windows. Refactor the personalization window protocol to use
a unified dirty-flag schedule/apply pattern instead of immediate per-
feature calls. This ensures all window decorations are applied together
after surface creation or property changes.
Log: Added window border and shadow customization for TreeLand
Influence:
rendering
apply
still work
feat: 为 Treeland 窗口添加边框和阴影支持
实现边框宽度/颜色和阴影半径/偏移/颜色。重构个性化窗口协议,使用统一的脏
标志调度/应用模式替代旧的即时逐特性调用。确保所有窗口装饰在表面创建或属
性更改后一起应用。
Log: 新增窗口边框和阴影定制功能
Influence: