fix(dde-blackwidget): align shutdown logo size with plymouth - #456
Merged
Merged
Conversation
Reviewer's GuideThe PR aligns shutdown logos with Plymouth by deriving per-screen native resolution and HiDPI scale through XRandR/EDID data, compensating for runtime resolution changes, and rendering independently scaled logos across multi-screen cover windows. Sequence diagram for per-screen shutdown logo renderingsequenceDiagram
participant BlackWidget
participant QScreen
participant XRandR
participant ScreenLogo
BlackWidget->>QScreen: makeLogoPixmap(screen)
QScreen->>XRandR: nativeResolution(screen)
XRandR-->>QScreen: preferred native mode
QScreen-->>BlackWidget: device scale and resolution factor
BlackWidget->>ScreenLogo: setPixmap(scaled logo)
BlackWidget->>ScreenLogo: setFixedSize and center
BlackWidget->>ScreenLogo: setVisible(m_logoVisible)
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 found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="dde-blackwidget/src/window.cpp" line_range="248" />
<code_context>
m_logo->setAccessibleName("BlackWidgetLogo");
m_logo->setVisible(false);
- QPixmap logoPixmap(plymouthLogoPath());
+ const QPixmap logoPixmap = makeLogoPixmap(qApp->primaryScreen());
if (logoPixmap.isNull()) {
qWarning() << "blackwidget logo pixmap is null";
</code_context>
<issue_to_address>
**issue (broader_impact):** The primary-screen logo is scaled only when it is first created, so after the primary screen, resolution, device pixel ratio, or preferred mode changes, the logo keeps the old screen's pixmap dimensions and no longer matches plymouth. `updateScreenWindows()` refreshes only the secondary-screen logos.
**Triggers:** When the display configuration changes after `setLogoVisible(true)` has created `m_logo`.
**Suggested fix:** Recreate or rescale `m_logo` for the current primary screen whenever screen geometry, DPR, or the preferred mode changes, alongside the secondary-screen refresh.
</issue_to_address>1. Replicate plymouth's device-scale heuristic (physical DPI > 192 → 2) to size the logo 2. Read panel native resolution via XRandR preferred mode instead of Qt logical size 3. Scale logo by device-scale × (X resolution / native) so it stays consistent after resolution changes 4. Render the logo on every screen with each screen's own scale Log: Align the shutdown black-screen logo size with plymouth on HiDPI and multi-screen setups Influence: Shutdown logo matches plymouth at any resolution fix(dde-blackwidget): 修复关机黑屏 logo 大小与 plymouth 不一致 1. 复刻 plymouth 的 device scale 判定(物理 DPI > 192 → 2)来确定 logo 尺寸 2. 用 XRandR 首选模式读取面板原生分辨率,替代 Qt 逻辑尺寸 3. 按 device scale × (X 分辨率 / 原生分辨率) 缩放 logo,降分辨率后仍与 plymouth 一致 4. 每个屏幕都渲染 logo,并按各屏自身缩放 Log: 修复关机黑屏 logo 在高分屏及多屏下与 plymouth 大小不一致的问题 PMS: BUG-377849 Influence: 关机 logo 在不同分辨率下均与 plymouth 对齐
robertkill
approved these changes
Sep 22, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, robertkill 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.
Log: Align the shutdown black-screen logo size with plymouth on HiDPI and multi-screen setups
Influence: Shutdown logo matches plymouth at any resolution
fix(dde-blackwidget): 修复关机黑屏 logo 大小与 plymouth 不一致
Log: 修复关机黑屏 logo 在高分屏及多屏下与 plymouth 大小不一致的问题
PMS: BUG-377849
Influence: 关机 logo 在不同分辨率下均与 plymouth 对齐
Summary by Sourcery
Align shutdown logo rendering with Plymouth across display scaling, resolution, and multi-screen setups.
Bug Fixes:
Enhancements:
Build: