fix: correct icon display order from right to left#1413
Merged
BLumia merged 1 commit intolinuxdeepin:masterfrom Jan 29, 2026
Merged
fix: correct icon display order from right to left#1413BLumia merged 1 commit intolinuxdeepin:masterfrom
BLumia merged 1 commit intolinuxdeepin:masterfrom
Conversation
change prepend to append operation to ensure icons are displayed in the correct order from right to left as intended 插件图标顺序从右到左(左:系统监视器;右:屏幕键盘)。 PMS: BUG-342419 Log: correct icon display order from right to left
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts how tray icons are inserted into sections so that new icons appear in right-to-left visual order by switching from prepending to appending IDs in the tray sort order model. Sequence diagram for registering tray icons with right-to-left orderingsequenceDiagram
actor User
participant App
participant TraySortOrderModel
participant Section
User->>App: Enable tray plugin icon
App->>TraySortOrderModel: registerToSection(surfaceId, sectionId)
TraySortOrderModel->>Section: contains(surfaceId)?
alt surfaceId not present
TraySortOrderModel->>Section: append(surfaceId)
Section-->>TraySortOrderModel: surfaceId added at end
else surfaceId already present
Section-->>TraySortOrderModel: no change
end
Section-->>App: updated ordered list of surfaceIds
App-->>User: Icons rendered from right to left using list order
Class diagram for TraySortOrderModel tray section insertion changeclassDiagram
class TraySortOrderModel {
+void registerToSection(QString surfaceId, QString sectionId)
}
class Section {
+QStringList surfaceIds
+bool contains(QString surfaceId)
+void append(QString surfaceId)
}
TraySortOrderModel --> Section : updates_ordered_surfaceIds
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review这段代码修改主要涉及到了托盘区域图标排序逻辑的变更。以下是对该 diff 的详细审查意见,包括语法逻辑、代码质量、性能和安全方面的分析: 1. 语法逻辑审查
2. 代码质量审查
3. 代码性能审查
4. 代码安全审查
总结与改进建议该代码修改是一个低风险、高质量的改动。它不仅修复了 UI 显示顺序的问题(符合产品需求),还顺便提升了数据插入的性能。 最终建议:
|
BLumia
approved these changes
Jan 29, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, re2zero 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 |
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.
change prepend to append operation to ensure icons are displayed in the correct order from right to left as intended
插件图标顺序从右到左(左:系统监视器;右:屏幕键盘)。
PMS: BUG-342419
Log: correct icon display order from right to left
Summary by Sourcery
Bug Fixes: