-
Notifications
You must be signed in to change notification settings - Fork 21
sync: from linuxdeepin/dtkdeclarative #307
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
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#534
|
[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 GuideThis PR syncs QML sources from upstream, enhancing the AlertToolTip by adding a shadowed connector and updating color palettes in FlowStyle to improve border and background visibility. Entity relationship diagram for updated palette properties in FlowStyle.qmlerDiagram
FLOWSTYLE {
real focusBorderPaddings
D.Palette border
D.Palette connecterBackground
D.Palette dropShadow
}
D.PALETTE {
normal
normalDark
}
FLOWSTYLE ||--o| D.PALETTE : border
FLOWSTYLE ||--o| D.PALETTE : connecterBackground
FLOWSTYLE ||--o| D.PALETTE : dropShadow
Class diagram for updated AlertToolTip.qml structureclassDiagram
class ToolTip {
}
class BoxShadow {
+D.Palette dropShadowColor
+D.Palette backgroundColor
+D.Palette borderColor
+y
+width
+height
+shadowBlur
+shadowOffsetY
+shadowColor
+cornerRadius
}
class Rectangle {
+color
+border.color
+border.width
}
ToolTip <|-- BoxShadow
BoxShadow <|-- Rectangle
Class diagram for updated FlowStyle.qml palette propertiesclassDiagram
class FlowStyle {
+D.Palette border
+D.Palette connecterBackground
+D.Palette dropShadow
}
class D.Palette {
+normal
+normalDark
}
FlowStyle --> D.Palette
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review根据提供的代码差异,我来对这段代码进行审查,并提出改进建议:
具体改进建议:
// 修改前
normal: Qt.rgba(0, 0, 0, 0.05)
normalDark: Qt.rgba(0, 0, 0, 0.05)
// 建议修改为
readonly property real defaultBorderOpacity: 0.05
normal: Qt.rgba(0, 0, 0, defaultBorderOpacity)
normalDark: Qt.rgba(0, 0, 0, defaultBorderOpacity)
// 修改前
normalDark: Qt.rgba(51 / 255.0, 51 / 255.0, 51 / 255.0, 1)
// 建议修改为
readonly property real darkGrayValue: 51 / 255.0
normalDark: Qt.rgba(darkGrayValue, darkGrayValue, darkGrayValue, 1)
// 建议添加性能优化
BoxShadow {
id: line
// ... 其他属性保持不变
// 添加缓存属性
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: line.width
height: line.height
radius: line.cornerRadius
}
}
}
// 在DS.Style中添加
property real minConnectorWidth: 2
property real maxConnectorWidth: 20
// 在使用时添加验证
width: Math.max(Math.min(DS.Style.alertToolTip.connectorWidth, maxConnectorWidth), minConnectorWidth)
property D.Palette dropShadowColor: DS.Style.isDarkMode ?
DS.Style.alertToolTip.connecterdropShadowDark :
DS.Style.alertToolTip.connecterdropShadowLight这些建议旨在提高代码的可维护性、性能和安全性,同时保持代码的清晰和可读性。 |
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.
Synchronize source files from linuxdeepin/dtkdeclarative.
Source-pull-request: linuxdeepin/dtkdeclarative#534
Summary by Sourcery
Sync source files from linuxdeepin/dtkdeclarative, introducing a connector arrow shadow in alert tooltips and refining style palette values.
New Features:
Enhancements: