Skip to content

Commit 7a69942

Browse files
deepin-ci-robot18202781743
authored andcommitted
sync: from linuxdeepin/dtkdeclarative
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#504
1 parent 54a20e5 commit 7a69942

3 files changed

Lines changed: 22 additions & 40 deletions

File tree

qt6/src/qml/AlertToolTip.qml

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,10 @@ ToolTip {
2020
margins: 0
2121
closePolicy: Popup.NoAutoClose
2222

23-
background: Item {
24-
BoxShadow {
25-
anchors.fill: _background
26-
shadowBlur: 20
27-
shadowOffsetY: 6
28-
shadowColor: Qt.rgba(0, 0, 0, 0.2)
29-
cornerRadius: _background.radius
30-
}
31-
32-
Rectangle {
33-
property D.Palette backgroundColor: DS.Style.alertToolTip.background
34-
property D.Palette borderColor: DS.Style.control.border
35-
id: _background
36-
anchors.fill: parent
37-
color: D.ColorSelector.backgroundColor
38-
border.color: D.ColorSelector.borderColor
39-
radius: DS.Style.control.radius
40-
}
23+
background: FloatingPanel {
24+
backgroundColor: DS.Style.alertToolTip.background
25+
insideBorderColor: DS.Style.alertToolTip.insideBorder
26+
outsideBorderColor: DS.Style.alertToolTip.outsideBorder
4127
}
4228

4329
contentItem: Text {
@@ -59,23 +45,4 @@ ToolTip {
5945
NumberAnimation { properties: "opacity"; from: 1.0; to: 0.0 }
6046
NumberAnimation { properties: "y"; from: control.target.height + DS.Style.control.spacing ; to: control.target.height }
6147
}
62-
63-
BoxShadow {
64-
property D.Palette dropShadowColor: DS.Style.alertToolTip.connecterdropShadow
65-
property D.Palette backgroundColor: DS.Style.alertToolTip.connecterBackground
66-
y: - height * (0.75) - control.topMargin - control.topPadding
67-
width: DS.Style.alertToolTip.connectorWidth
68-
height: DS.Style.alertToolTip.connectorHeight
69-
shadowBlur: 4
70-
shadowOffsetY: 2
71-
shadowColor: D.ColorSelector.dropShadowColor
72-
cornerRadius: _background.radius
73-
74-
Rectangle {
75-
anchors.fill: parent
76-
color: parent.D.ColorSelector.backgroundColor
77-
border.color: _background.D.ColorSelector.borderColor
78-
border.width: 1
79-
}
80-
}
8148
}

qt6/src/qml/FloatingPanel.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Control {
8181

8282
Loader {
8383
anchors.fill: backgroundRect
84-
active: control.insideBorderColor && control.D.ColorSelector.controlTheme === D.ApplicationHelper.DarkType
84+
active: control.insideBorderColor
8585
sourceComponent: InsideBoxBorder {
8686
radius: backgroundRect.radius
8787
color: control.D.ColorSelector.insideBorderColor

qt6/src/qml/FlowStyle.qml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,8 @@ QtObject {
619619
}
620620

621621
property D.Palette background: D.Palette {
622-
normal: Qt.rgba(247 / 255, 247 / 255, 247 / 255, 0.6)
623-
normalDark: Qt.rgba(59 / 255, 59 / 255, 59 / 255, 0.6)
622+
normal: Qt.rgba(247 / 255.0, 247 / 255.0, 247 / 255.0, 0.5)
623+
normalDark: Qt.rgba(59 / 255.0, 59 / 255.0, 59 / 255.0, 0.5)
624624
}
625625

626626
property D.Palette connecterdropShadow: D.Palette {
@@ -631,6 +631,21 @@ QtObject {
631631
normal: Qt.rgba(1, 1, 1, 1)
632632
normalDark: Qt.rgba(0, 0, 0, 0.1)
633633
}
634+
635+
property D.Palette dropShadow: D.Palette {
636+
normal: Qt.rgba(0, 0, 0, 0.1)
637+
normalDark: Qt.rgba(0, 0, 0, 0.2)
638+
}
639+
640+
property D.Palette outsideBorder: D.Palette {
641+
normal: Qt.rgba(0, 0, 0, 0.1)
642+
normalDark: Qt.rgba(0, 0, 0, 0.7)
643+
}
644+
645+
property D.Palette insideBorder: D.Palette {
646+
normal: Qt.rgba(1, 1, 1, 0.3)
647+
normalDark: Qt.rgba(1, 1, 1, 0.1)
648+
}
634649
}
635650

636651
property QtObject menu: QtObject {

0 commit comments

Comments
 (0)