fix: fix incomplete display#546
Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom Apr 9, 2026
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the network dock applet layout to remove extra vertical spacing and relies on existing container margin handling, fixing incomplete display issues. Sequence diagram for updated network applet layout handlingsequenceDiagram
actor User
participant Dock
participant NetworkPlugin
participant DockContentWidget
User->>Dock: open network applet
Dock->>NetworkPlugin: message(jsonMsg)
NetworkPlugin->>NetworkPlugin: parse jsonMsg to msgObj
alt msg type is APPLET_CONTAINER
NetworkPlugin->>DockContentWidget: setMainLayoutMargins(QMargins(0, topMargin, 0, 0))
DockContentWidget->>DockContentWidget: apply margins and spacing
else other msg type
NetworkPlugin->>NetworkPlugin: handle other message types
end
Class diagram for updated DockContentWidget layout configurationclassDiagram
class QWidget
class DockContentWidget {
- QVBoxLayout* m_mainLayout
- QWidget* m_netView
+ DockContentWidget(QWidget* parent)
+ setMainLayoutMargins(QMargins margins)
}
DockContentWidget --|> QWidget
class QVBoxLayout {
+ setContentsMargins(int left, int top, int right, int bottom)
+ setSpacing(int spacing)
+ addWidget(QWidget* widget, int stretch, Qt_Alignment alignment)
}
class QMargins {
+ QMargins(int left, int top, int right, int bottom)
}
class Qt_Alignment
DockContentWidget --> QVBoxLayout : uses m_mainLayout
DockContentWidget --> QWidget : uses m_netView
%% Updated layout behavior
DockContentWidget : m_mainLayout->setContentsMargins(0, 10, 0, 0)
DockContentWidget : m_mainLayout->setSpacing(0)
DockContentWidget : m_mainLayout->addWidget(m_netView, 0, Qt_AlignTop_AlignHCenter)
DockContentWidget : m_mainLayout->addWidget(buttonWidget, 0, Qt_AlignBottom)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Removing the MSG_SET_APPLET_MIN_HEIGHT handling means any min-height commands from the dock will now be ignored; please confirm this message is no longer used or that the behavior change is intentional across all consumers.
- With the stretch and spacing removed, the bottom button widget may no longer stay visually anchored at the bottom when the container grows; consider using a spacer with adjustable size or layout alignment that preserves the bottom positioning without reintroducing excessive gaps.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Removing the MSG_SET_APPLET_MIN_HEIGHT handling means any min-height commands from the dock will now be ignored; please confirm this message is no longer used or that the behavior change is intentional across all consumers.
- With the stretch and spacing removed, the bottom button widget may no longer stay visually anchored at the bottom when the container grows; consider using a spacer with adjustable size or layout alignment that preserves the bottom positioning without reintroducing excessive gaps.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
there is extra spacing in the layout, causing display issues. Log: fix incomplete display PMS: BUG-353585 fix: 修复显示不全 布局中多了间距,显示有问题 Log: 修复显示不全
caixr23
approved these changes
Apr 9, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, ut003640 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 |
Contributor
|
This pr force merged! (status: unstable) |
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.
there is extra spacing in the layout, causing display issues.
Log: fix incomplete display
PMS: BUG-353585
fix: 修复显示不全
布局中多了间距,显示有问题
Log: 修复显示不全
Summary by Sourcery
Adjust the network dock applet layout to remove unintended spacing and rely on a fixed layout configuration instead of dynamic minimum height updates.
Bug Fixes:
Enhancements: