-
Notifications
You must be signed in to change notification settings - Fork 42
style: improve TitleBar layout implementation #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. 可见性逻辑保持不变但实现更清晰
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#491
deepin pr auto review关键摘要:
是否建议立即修改:
建议的修改:
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
[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 |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#491
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: