Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#542
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpstream sync: Introduced leftPadding/rightPadding properties in DialogWindow.qml to centralize horizontal content margins and refactored Layout margins to use these new properties instead of direct DS.Style references. Class diagram for updated DialogWindow.qml propertiesclassDiagram
class DialogWindow {
string icon
alias content
alias palette
real leftPadding
real rightPadding
}
DialogWindow : leftPadding = DS.Style.dialogWindow.contentHMargin
DialogWindow : rightPadding = DS.Style.dialogWindow.contentHMargin
DialogWindow --> Item : content
Item --> Loader : contentLoader
Loader : Layout.leftMargin = control.leftPadding
Loader : Layout.rightMargin = control.rightPadding
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
Author
deepin pr auto review我来对这段 QML 代码的修改进行审查:
建议:
示例改进代码: Window {
// ... 其他属性 ...
// 添加统一的 padding 属性
property real padding: 0
property real leftPadding: padding || DS.Style.dialogWindow.contentHMargin
property real rightPadding: padding || DS.Style.dialogWindow.contentHMargin
property real topPadding: padding
property real bottomPadding: padding
// 添加属性验证
onLeftPaddingChanged: if(leftPadding < 0) leftPadding = 0
onRightPaddingChanged: if(rightPadding < 0) rightPadding = 0
onTopPaddingChanged: if(topPadding < 0) topPadding = 0
onBottomPaddingChanged: if(bottomPadding < 0) bottomPadding = 0
// ... 其他代码 ...
}总的来说,这个修改是一个很好的改进,提高了代码的灵活性和可维护性。通过添加内边距属性,使得对话框的内容区域布局更加可控。 |
mhduiy
approved these changes
Oct 21, 2025
Contributor
Author
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot, 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 |
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.
Synchronize source files from linuxdeepin/dtkdeclarative.
Source-pull-request: linuxdeepin/dtkdeclarative#542
Summary by Sourcery
Introduce horizontal padding properties in DialogWindow.qml and refactor its content loader to use these properties for margin configuration
Enhancements: