sync: from linuxdeepin/dtkdeclarative#308
Closed
deepin-ci-robot wants to merge 1 commit intomasterfrom
Closed
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#535
Contributor
Author
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR synchronizes UI metric updates from upstream, refining default styling values by uniformly reducing corner radius, component heights, and horizontal margins in FlowStyle.qml. Class diagram for updated FlowStyle.qml propertiesclassDiagram
class FlowStyle {
+control: QtObject
+button: QtObject
+comboBox: QtObject
+dialogWindow: QtObject
}
class control {
+radius: int = 6
+spacing: int = 6
+padding: int = 6
+borderWidth: int = 1
}
class button {
+width: int = 140
+height: int = 30
+hPadding: int = control.radius
+vPadding: float = control.radius / 2.0
+iconSize: int = 24
}
class comboBox {
+width: int = 240
+height: int = 30
+padding: int = 8
+spacing: int = 10
+iconSize: int = 12
}
class dialogWindow {
+width: int = 120
+height: int = 120
+contentHMargin: int = 6
+footerMargin: int = 10
+titleBarHeight: int = 50
+iconSize: int = 32
}
FlowStyle --> control
FlowStyle --> button
FlowStyle --> comboBox
FlowStyle --> dialogWindow
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
Author
deepin pr auto review我对这个git diff进行了审查,以下是关于代码改进的意见:
改进建议:
property int vPadding: Math.floor(control.radius / 2) // 使用整数运算
QtObject {
// 常量定义
readonly property int DEFAULT_SPACING: 6
readonly property int DEFAULT_RADIUS: 6
readonly property int DEFAULT_BUTTON_HEIGHT: 30
property QtObject control: QtObject {
property int radius: DEFAULT_RADIUS
property int spacing: DEFAULT_SPACING
// ...
}
property QtObject button: QtObject {
property int height: DEFAULT_BUTTON_HEIGHT
// ...
}
}
/*
* FlowStyle - 定义了Flow组件的基础样式
* 包含控制元素、按钮、对话框等通用样式定义
*/
QtObject {
// ...
}
property QtObject control: QtObject {
property int radius: Math.max(0, 6) // 确保半径不为负
// ...
}总结:
|
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#535
Summary by Sourcery
Synchronize flow style metrics from linuxdeepin/dtkdeclarative by adjusting default dimensions for controls
Enhancements: