-
Notifications
You must be signed in to change notification settings - Fork 43
feat: add customizable padding properties to DialogWindow #542
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
Added leftPadding and rightPadding properties to DialogWindow component to allow flexible content spacing customization. Previously, content margins were hardcoded using DS.Style.dialogWindow.contentHMargin. Now developers can override these values when needed while maintaining the default behavior. The changes include: 1. Added leftPadding and rightPadding properties with default values from DS.Style.dialogWindow.contentHMargin 2. Updated contentLoader Layout margins to use the new padding properties instead of hardcoded values 3. This maintains backward compatibility while providing customization flexibility Log: Added customizable left and right padding properties to DialogWindow Influence: 1. Test DialogWindow with default padding values to ensure existing behavior is preserved 2. Verify custom padding values are properly applied when set 3. Check that content layout adapts correctly to different padding values 4. Test with various content types to ensure proper spacing 5. Verify that the component still renders correctly in different window sizes feat: 为 DialogWindow 添加可自定义的内边距属性 为 DialogWindow 组件添加 leftPadding 和 rightPadding 属性,允许灵活自定 义内容间距。之前内容边距是使用 DS.Style.dialogWindow.contentHMargin 硬编 码的。现在开发者可以在需要时覆盖这些值,同时保持默认行为。 变更包括: 1. 添加 leftPadding 和 rightPadding 属性,默认值来自 DS.Style.dialogWindow.contentHMargin 2. 更新 contentLoader 的布局边距以使用新的内边距属性而非硬编码值 3. 这保持了向后兼容性,同时提供了自定义灵活性 Log: 为 DialogWindow 添加可自定义的左右内边距属性 Influence: 1. 使用默认内边距值测试 DialogWindow,确保现有行为得以保留 2. 验证设置自定义内边距值时是否正确应用 3. 检查内容布局是否能正确适应不同的内边距值 4. 使用不同类型的内容测试,确保间距正确 5. 验证组件在不同窗口大小下是否仍能正确渲染 pms: BUG-317115
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#542
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds Class diagram for updated DialogWindow propertiesclassDiagram
class DialogWindow {
+real leftPadding
+real rightPadding
icon: string
palette
content
}
DialogWindow --> ContentLoader
class ContentLoader {
+Layout.leftMargin
+Layout.rightMargin
+Layout.fillWidth
+Layout.preferredHeight
}
DialogWindow : leftPadding = DS.Style.dialogWindow.contentHMargin
DialogWindow : rightPadding = DS.Style.dialogWindow.contentHMargin
ContentLoader : Layout.leftMargin = DialogWindow.leftPadding
ContentLoader : Layout.rightMargin = DialogWindow.rightPadding
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.
|
[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#542
Added leftPadding and rightPadding properties to DialogWindow component to allow flexible content spacing customization. Previously, content margins were hardcoded using DS.Style.dialogWindow.contentHMargin. Now developers can override these values when needed while maintaining the default behavior.
The changes include:
Log: Added customizable left and right padding properties to DialogWindow
Influence:
feat: 为 DialogWindow 添加可自定义的内边距属性
为 DialogWindow 组件添加 leftPadding 和 rightPadding 属性,允许灵活自定 义内容间距。之前内容边距是使用 DS.Style.dialogWindow.contentHMargin 硬编 码的。现在开发者可以在需要时覆盖这些值,同时保持默认行为。
变更包括:
Log: 为 DialogWindow 添加可自定义的左右内边距属性
Influence:
pms: BUG-317115
Summary by Sourcery
Introduce customizable left and right padding properties to the DialogWindow component and update its content layout to utilize these properties while preserving existing defaults.
New Features:
Enhancements: