style: improve TitleBar layout implementation#491
Merged
18202781743 merged 1 commit intolinuxdeepin:masterfrom Jun 11, 2025
Merged
style: improve TitleBar layout implementation#49118202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743 merged 1 commit intolinuxdeepin:masterfrom
Conversation
1. Changed `implicitHeight` to `height` for more explicit sizing control 2. Modified background and content layouts to use explicit width/height instead of anchors.fill 3. These changes provide better layout consistency and prevent potential anchoring issues 4. The visibility logic remains the same but is now more clearly implemented style: 改进 TitleBar 布局实现 1. 将 `implicitHeight` 改为 `height` 以获得更明确的尺寸控制 2. 修改背景和内容布局使用显式宽高而非 anchors.fill 3. 这些改动提供了更好的布局一致性并防止潜在的锚定问题 4. 可见性逻辑保持不变但实现更清晰
deepin-ci-robot
added a commit
to linuxdeepin/dtk6declarative
that referenced
this pull request
Jun 10, 2025
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#491
Contributor
deepin pr auto review关键摘要:
是否建议立即修改:
建议的修改:
|
deepin-ci-robot
added a commit
to linuxdeepin/dtk6declarative
that referenced
this pull request
Jun 10, 2025
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#491
Reviewer's GuideRevises TitleBar.qml to replace implicitHeight and anchor-based sizing with explicit width/height bindings for more consistent layout, and refactors the visibility logic to be clearer without altering behavior. Updated Class Diagram for TitleBar.qml Layout ChangesclassDiagram
class TitleBar {
~implicitHeight: any~
height: any
title: string
icon: alias
background: Loader
content: ColumnLayout
}
class Loader {
<<background>>
~anchors.fill: any~
width: any
height: any
active: bool
sourceComponent: Component
}
class ColumnLayout {
<<content>>
~anchors.fill: any~
width: any
height: any
spacing: int
visible: bool
}
TitleBar "1" *-- "1" Loader : contains
TitleBar "1" *-- "1" ColumnLayout : contains
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @18202781743 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
mhduiy
approved these changes
Jun 11, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
18202781743
pushed a commit
to linuxdeepin/dtk6declarative
that referenced
this pull request
Jun 11, 2025
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#491
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.
implicitHeighttoheightfor more explicit sizing controlinstead of anchors.fill
anchoring issues
implemented
style: 改进 TitleBar 布局实现
implicitHeight改为height以获得更明确的尺寸控制Summary by Sourcery
Improve TitleBar layout by using explicit width and height properties instead of anchors and implicit sizing to enhance consistency and prevent anchoring issues.
Enhancements: