sync: from linuxdeepin/dtkdeclarative#305
Merged
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR synchronizes AlertToolTip.qml from linuxdeepin/dtkdeclarative, introducing dynamic vertical positioning for tooltips and disabling opacity fade animations due to transparency issues. Sequence diagram for AlertToolTip enter/exit transitions (opacity animation disabled)sequenceDiagram
participant "ToolTip"
participant "Transition"
"ToolTip"->>"Transition": Trigger enter
"Transition"->>"ToolTip": Animate y from target.height to target.height + spacing
"ToolTip"->>"Transition": Trigger exit
"Transition"->>"ToolTip": Animate y from target.height + spacing to target.height
Class diagram for updated AlertToolTip.qml properties and transitionsclassDiagram
class ToolTip {
+Item target
+int x
+int y
+int topPadding
+int bottomPadding
+int leftPadding
+int rightPadding
+Transition enter
+Transition exit
}
class Transition {
+NumberAnimation y
// Opacity animation temporarily removed
}
ToolTip --> Transition
Flow diagram for dynamic vertical positioning in AlertToolTip.qmlflowchart TD
A["ToolTip initialized"] --> B["Check if target exists"]
B -->|target exists| C["Set y to target.height + DS.Style.control.spacing"]
B -->|target does not exist| D["Set y to 0"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
8ea2af8 to
e32b0b7
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#532
e32b0b7 to
4ffbbb1
Compare
Contributor
Author
deepin pr auto review我对这个git diff进行审查,以下是改进意见:
改进建议: ToolTip {
id: control
property Item target
// 添加可见性控制
visible: target !== null
x: 0
y: target ? target.height + DS.Style.control.spacing : 0
topPadding: DS.Style.alertToolTip.verticalPadding
bottomPadding: DS.Style.alertToolTip.verticalPadding
leftPadding: DS.Style.alertToolTip.horizontalPadding
rightPadding: DS.Style.alertToolTip.horizontalPadding
contentItem: Text {
text: control.text
color: DS.Style.alertToolTip.textColor
font: DS.Style.alertToolTip.font
}
background: Rectangle {
color: DS.Style.alertToolTip.backgroundColor
radius: DS.Style.alertToolTip.radius
}
enter: Transition {
// 考虑使用不透明度动画的替代方案
NumberAnimation {
properties: "y";
from: target ? target.height : 0;
to: target ? target.height + DS.Style.control.spacing : 0;
duration: 200
}
}
exit: Transition {
NumberAnimation {
properties: "y";
from: target ? target.height + DS.Style.control.spacing : 0;
to: target ? target.height : 0;
duration: 200
}
}
}这些改进包括:
对于透明度动画的问题,建议考虑以下替代方案:
|
mhduiy
approved these changes
Sep 25, 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#532
Summary by Sourcery
Sync AlertToolTip.qml from upstream: add default vertical positioning and disable opacity animations to avoid transparency issues
Enhancements: