fix: remove device pixel ratio scaling in drag pixmap#417
Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom Feb 2, 2026
Merged
fix: remove device pixel ratio scaling in drag pixmap#417deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
Removed device pixel ratio scaling from drag pixmap creation to fix incorrect rendering on high DPI displays. The scaling was causing the drag preview image to appear too small and misaligned. Changes include: 1. Remove ratio calculation and usage in image dimensions 2. Simplify width/height calculations without DPI scaling 3. Fix rounded rectangle coordinates to use proper pixel values 4. Maintain image quality while ensuring correct display size Log: Fixed drag tab preview display issue on high DPI screens Influence: 1. Test tab dragging on both standard and high DPI displays 2. Verify drag preview image size matches expected dimensions 3. Check that rounded corners render correctly 4. Confirm image quality remains acceptable during drag operations 5. Test on different display scaling settings (100%, 150%, 200%) fix: 修复拖拽标签页预览在高DPI显示下的问题 移除了拖拽图片创建中的设备像素比缩放,以修复在高DPI显示器上的不正确渲染 问题。之前的缩放导致拖拽预览图片显示过小且错位。修改包括: 1. 移除图像尺寸中的比例计算和使用 2. 简化宽度/高度计算,不使用DPI缩放 3. 修复圆角矩形坐标使用正确的像素值 4. 保持图像质量的同时确保正确的显示尺寸 Log: 修复高DPI屏幕下拖拽标签页预览显示问题 Influence: 1. 在标准和高DPI显示器上测试标签页拖拽功能 2. 验证拖拽预览图片尺寸是否符合预期 3. 检查圆角渲染是否正确 4. 确认拖拽操作期间图像质量保持可接受 5. 在不同显示缩放设置下测试(100%、150%、200%)
deepin pr auto review这段代码修改涉及到了 Qt 中高 DPI(High DPI)屏幕适配的处理,主要逻辑是生成拖拽标签页时的预览图。以下是对这段 diff 的详细审查: 1. 语法逻辑审查
2. 代码质量审查
3. 代码性能审查
4. 代码安全审查
改进建议
总结这段代码修改在逻辑上修复了原代码的 Bug(圆角尺寸计算错误),在性能上有所提升(减少了像素处理量),在代码质量上需要补充空指针检查和移除调试日志。总体上是一个正向的优化。 |
lzwind
approved these changes
Feb 2, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Kakueeen, lzwind 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 |
Contributor
Author
|
/forcemerge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed device pixel ratio scaling from drag pixmap creation to fix
incorrect rendering on high DPI displays. The scaling was causing the
drag preview image to appear too small and misaligned. Changes include:
Log: Fixed drag tab preview display issue on high DPI screens
Influence:
fix: 修复拖拽标签页预览在高DPI显示下的问题
移除了拖拽图片创建中的设备像素比缩放,以修复在高DPI显示器上的不正确渲染
问题。之前的缩放导致拖拽预览图片显示过小且错位。修改包括:
Log: 修复高DPI屏幕下拖拽标签页预览显示问题
Influence: