Skip to content

fix: [notify] Rewrite notification item delegate with paint method#1035

Merged
deepin-ci-robot merged 1 commit intoCodeya-IDE:masterfrom
Kakueeen:issue
Jan 3, 2025
Merged

fix: [notify] Rewrite notification item delegate with paint method#1035
deepin-ci-robot merged 1 commit intoCodeya-IDE:masterfrom
Kakueeen:issue

Conversation

@Kakueeen
Copy link
Contributor

@Kakueeen Kakueeen commented Jan 2, 2025

Refactored notification item delegate to use direct painting instead of widget-based
approach for better performance and visual consistency. Key changes include:

  • Removed widget-based item delegate implementation
  • Added custom paint methods for background, icon, text and buttons
  • Implemented mouse event handling for close button and action buttons
  • Added text layout handling with proper wrapping and elision
  • Introduced constants for layout metrics and spacing
  • Added new roles and data structure for action button info

The new implementation provides smoother scrolling and consistent styling while
reducing memory usage by eliminating widget creation for each item.

Log: Refactor notification item delegate to use paint-based rendering
Bug: https://pms.uniontech.com/bug-view-272445.html

Refactored notification item delegate to use direct painting instead of widget-based
approach for better performance and visual consistency. Key changes include:

- Removed widget-based item delegate implementation
- Added custom paint methods for background, icon, text and buttons
- Implemented mouse event handling for close button and action buttons
- Added text layout handling with proper wrapping and elision
- Introduced constants for layout metrics and spacing
- Added new roles and data structure for action button info

The new implementation provides smoother scrolling and consistent styling while
reducing memory usage by eliminating widget creation for each item.

Log: Refactor notification item delegate to use paint-based rendering
Bug: https://pms.uniontech.com/bug-view-272445.html
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepin-mozart, Kakueeen

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

The pull request process is described 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

@deepin-ci-robot deepin-ci-robot merged commit e7eda41 into Codeya-IDE:master Jan 3, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants