Skip to content

feat: add split window background support for dock app items#1543

Open
wjyrich wants to merge 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-UIWithbg
Open

feat: add split window background support for dock app items#1543
wjyrich wants to merge 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-UIWithbg

Conversation

@wjyrich
Copy link
Copy Markdown
Contributor

@wjyrich wjyrich commented Apr 2, 2026

  1. Created new AppBackground.qml component to handle split window background rendering
  2. Added splitBackgroundVisible property to control split background display
  3. Enhanced AppletItemBackground.qml with drawDefaultBackground property for conditional rendering
  4. Modified AppItem.qml to use AppBackground instead of AppletItemBackground
  5. Updated text calculation logic to remove extra spacing between icon and title
  6. Added windowSplit property propagation through components
  7. Improved title text color handling based on active state and theme

Log: Added split window background visualization for dock app items

Influence:

  1. Test dock app items with multiple windows open in split mode
  2. Verify background colors change correctly in light and dark themes
  3. Check hover and active states for split window backgrounds
  4. Test title text color changes when app is active
  5. Verify spacing between icon and title in split mode
  6. Test transition animations when switching between split and non- split modes

feat: 为任务栏应用项添加分屏窗口背景支持

  1. 创建新的 AppBackground.qml 组件处理分屏窗口背景渲染
  2. 添加 splitBackgroundVisible 属性控制分屏背景显示
  3. 增强 AppletItemBackground.qml 添加 drawDefaultBackground 属性用于条件 渲染
  4. 修改 AppItem.qml 使用 AppBackground 替代 AppletItemBackground
  5. 更新文本计算逻辑,移除图标和标题之间的额外间距
  6. 添加 windowSplit 属性在组件间传递
  7. 改进标题文本颜色处理,基于激活状态和主题

Log: 新增任务栏应用项分屏窗口背景可视化功能

Influence:

  1. 测试分屏模式下打开多个窗口的任务栏应用项
  2. 验证浅色和深色主题下背景颜色正确变化
  3. 检查分屏窗口背景的悬停和激活状态
  4. 测试应用激活时标题文本颜色变化
  5. 验证分屏模式下图标和标题之间的间距
  6. 测试分屏和非分屏模式切换时的过渡动画

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @wjyrich, 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: wjyrich

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

@wjyrich wjyrich force-pushed the fix-UIWithbg branch 3 times, most recently from 602f247 to 8a25754 Compare April 3, 2026 02:33
if (textWidth > 0.0) {
qreal appTitleSpacing = qMax(10.0, m_iconSize / 3.0);
itemWidth = m_iconSize + m_itemPadding + textWidth + appTitleSpacing;
itemWidth = m_iconSize + m_itemPadding + textWidth;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这个改了之后,跟界面上的不一致,算总的缩略时不会出问题么?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

这个已经在后面的spacingWidth 计算加上去了不包括了。

@wjyrich wjyrich force-pushed the fix-UIWithbg branch 2 times, most recently from 6dbf86a to 2e10a9a Compare April 3, 2026 06:34
1. Created new AppBackground.qml component to handle split window
background rendering
2. Added splitBackgroundVisible property to control split background
display
3. Enhanced AppletItemBackground.qml with drawDefaultBackground property
for conditional rendering
4. Modified AppItem.qml to use AppBackground instead of
AppletItemBackground
5. Updated text calculation logic to remove extra spacing between icon
and title
6. Added windowSplit property propagation through components
7. Improved title text color handling based on active state and theme

Log: Added split window background visualization for dock app items

Influence:
1. Test dock app items with multiple windows open in split mode
2. Verify background colors change correctly in light and dark themes
3. Check hover and active states for split window backgrounds
4. Test title text color changes when app is active
5. Verify spacing between icon and title in split mode
6. Test transition animations when switching between split and non-
split modes

feat: 为任务栏应用项添加分屏窗口背景支持

1. 创建新的 AppBackground.qml 组件处理分屏窗口背景渲染
2. 添加 splitBackgroundVisible 属性控制分屏背景显示
3. 增强 AppletItemBackground.qml 添加 drawDefaultBackground 属性用于条件
渲染
4. 修改 AppItem.qml 使用 AppBackground 替代 AppletItemBackground
5. 更新文本计算逻辑,移除图标和标题之间的额外间距
6. 添加 windowSplit 属性在组件间传递
7. 改进标题文本颜色处理,基于激活状态和主题

Log: 新增任务栏应用项分屏窗口背景可视化功能

Influence:
1. 测试分屏模式下打开多个窗口的任务栏应用项
2. 验证浅色和深色主题下背景颜色正确变化
3. 检查分屏窗口背景的悬停和激活状态
4. 测试应用激活时标题文本颜色变化
5. 验证分屏模式下图标和标题之间的间距
6. 测试分屏和非分屏模式切换时的过渡动画
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

property bool enableTitle: false
property bool titleActive: enableTitle && titleLoader.active
property int appTitleSpacing: 0
property bool splitBackgroundVisible: root.windowSplit && root.enableTitle
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这个windowSplit不需要吧,root.enableTitle已经包含了它吧,

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
Copy link
Copy Markdown
Contributor

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