Skip to content

refactor: simplify search edit and fix UI issues#306

Merged
deepin-bot[bot] merged 2 commits into
linuxdeepin:masterfrom
Kakueeen:master
May 21, 2026
Merged

refactor: simplify search edit and fix UI issues#306
deepin-bot[bot] merged 2 commits into
linuxdeepin:masterfrom
Kakueeen:master

Conversation

@Kakueeen
Copy link
Copy Markdown
Contributor

  1. Remove custom SearchLineEdit class and replace with standard
    QLineEdit

    • Eliminate custom cursor painting and blinking timer logic
    • Remove QProxyStyle subclass used to hide default cursor
    • Move palette setup to SearchEditPrivate::init()
    • This reduces code complexity and maintenance burden while relying
      on Qt's native cursor behavior
  2. Fix incorrect widget assignment in GeneralToolBar

    • Correct m_vLine2->setFixedHeight() call (was incorrectly setting
      m_vLine1 again)
    • Adjust layout spacing from 0 to 2 for better visual separation
  3. Optimize text thumbnail generation

    • Reduce thumbnail width by factor of 0.70707070 (√2 approximation)
      for proper aspect ratio
    • Improves visual quality of text file previews

Log: Fixed search edit cursor behavior and toolbar layout issues

Influence:

  1. Test search input field cursor visibility and blinking behavior in
    both light and dark themes
  2. Verify search edit accepts text input normally and responds to focus
    changes
  3. Test search edit palette colors adapt correctly to theme switches
  4. Verify GeneralToolBar vertical divider lines display at correct 30px
    height
  5. Check toolbar button spacing is visually appropriate with 2px spacing
  6. Test text file thumbnail generation produces properly proportioned
    previews
  7. Verify text thumbnails render correctly for various file sizes and
    content types

refactor: 简化搜索编辑框并修复 UI 问题

  1. 移除自定义 SearchLineEdit 类,替换为标准 QLineEdit

    • 消除自定义光标绘制和闪烁定时器逻辑
    • 移除用于隐藏默认光标的 QProxyStyle 子类
    • 将调色板设置移至 SearchEditPrivate::init()
    • 降低代码复杂度和维护负担,同时依赖 Qt 的原生光标行为
  2. 修复 GeneralToolBar 中错误的控件赋值

    • 修正 m_vLine2->setFixedHeight() 调用(之前错误地再次设置了
      m_vLine1)
    • 将布局间距从 0 调整为 2,以获得更好的视觉分隔效果
  3. 优化文本缩略图生成

    • 将缩略图宽度按 0.70707070(√2 近似值)比例缩减,以获得正确的宽高比
    • 提升文本文件预览的视觉质量

Log: 修复搜索编辑框光标行为和工具栏布局问题

Influence:

  1. 测试搜索输入框在浅色和深色主题下的光标可见性和闪烁行为
  2. 验证搜索编辑框正常接收文本输入并响应焦点变化
  3. 测试搜索编辑框调色板颜色是否正确适应主题切换
  4. 验证 GeneralToolBar 垂直分隔线是否正确显示为 30px 高度
  5. 检查工具栏按钮间距在 2px 设置下视觉效果是否合适
  6. 测试文本文件缩略图生成是否产生比例适当的预览图
  7. 验证各种文件大小和类型的文本缩略图渲染是否正确

1. Remove custom SearchLineEdit class and replace with standard
QLineEdit
   - Eliminate custom cursor painting and blinking timer logic
   - Remove QProxyStyle subclass used to hide default cursor
   - Move palette setup to SearchEditPrivate::init()
   - This reduces code complexity and maintenance burden while relying
on Qt's native cursor behavior

2. Fix incorrect widget assignment in GeneralToolBar
   - Correct m_vLine2->setFixedHeight() call (was incorrectly setting
m_vLine1 again)
   - Adjust layout spacing from 0 to 2 for better visual separation

3. Optimize text thumbnail generation
   - Reduce thumbnail width by factor of 0.70707070 (√2 approximation)
for proper aspect ratio
   - Improves visual quality of text file previews

Log: Fixed search edit cursor behavior and toolbar layout issues

Influence:
1. Test search input field cursor visibility and blinking behavior in
both light and dark themes
2. Verify search edit accepts text input normally and responds to focus
changes
3. Test search edit palette colors adapt correctly to theme switches
4. Verify GeneralToolBar vertical divider lines display at correct 30px
height
5. Check toolbar button spacing is visually appropriate with 2px spacing
6. Test text file thumbnail generation produces properly proportioned
previews
7. Verify text thumbnails render correctly for various file sizes and
content types

refactor: 简化搜索编辑框并修复 UI 问题

1. 移除自定义 SearchLineEdit 类,替换为标准 QLineEdit
   - 消除自定义光标绘制和闪烁定时器逻辑
   - 移除用于隐藏默认光标的 QProxyStyle 子类
   - 将调色板设置移至 SearchEditPrivate::init()
   - 降低代码复杂度和维护负担,同时依赖 Qt 的原生光标行为

2. 修复 GeneralToolBar 中错误的控件赋值
   - 修正 m_vLine2->setFixedHeight() 调用(之前错误地再次设置了
m_vLine1)
   - 将布局间距从 0 调整为 2,以获得更好的视觉分隔效果

3. 优化文本缩略图生成
   - 将缩略图宽度按 0.70707070(√2 近似值)比例缩减,以获得正确的宽高比
   - 提升文本文件预览的视觉质量

Log: 修复搜索编辑框光标行为和工具栏布局问题

Influence:
1. 测试搜索输入框在浅色和深色主题下的光标可见性和闪烁行为
2. 验证搜索编辑框正常接收文本输入并响应焦点变化
3. 测试搜索编辑框调色板颜色是否正确适应主题切换
4. 验证 GeneralToolBar 垂直分隔线是否正确显示为 30px 高度
5. 检查工具栏按钮间距在 2px 设置下视觉效果是否合适
6. 测试文本文件缩略图生成是否产生比例适当的预览图
7. 验证各种文件大小和类型的文本缩略图渲染是否正确
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 @Kakueeen, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

as title

Log: update version
@github-actions
Copy link
Copy Markdown

TAG Bot

TAG: 6.0.35
EXISTED: no
DISTRIBUTION: unstable

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs, Kakueeen

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

@Kakueeen
Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot
Copy link
Copy Markdown

deepin-bot Bot commented May 21, 2026

This pr force merged! (status: blocked)

@deepin-bot deepin-bot Bot merged commit 5edd9b5 into linuxdeepin:master May 21, 2026
9 of 12 checks passed
@deepin-bot
Copy link
Copy Markdown

deepin-bot Bot commented May 21, 2026

TAG Bot

Tag created successfully

📋 Tag Details
  • Tag Name: 6.0.35
  • Tag SHA: 5efd2631e25f1e663873e4a0bee48932197907cd
  • Commit SHA: 9a6438a4f4fdcb79763a92e69d4012845456d13a
  • Tag Message:
    Release dde-grand-search 6.0.35
    
    
  • Tagger:
    • Name: Kakueeen
  • Distribution: unstable

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