Skip to content

Commit e59a1e3

Browse files
committed
feat: add connector line to alert tooltip
1. Added BoxShadow component with connector styling to AlertToolTip 2. Implemented connector line that visually connects tooltip to target element 3. Positioned connector above tooltip with proper spacing and margins 4. Enhanced border opacity from 0.05 to 0.1 for better visibility 5. Updated connector background color in dark mode to solid dark gray (RGB 51,51,51) Log: Added visual connector line between alert tooltips and their target elements Influence: 1. Test alert tooltip display with connector line visible 2. Verify connector positioning relative to tooltip and target element 3. Check connector appearance in both light and dark themes 4. Validate connector styling including shadow, border, and colors 5. Test tooltip animations with the new connector element 6. Ensure connector doesn't interfere with tooltip functionality feat: 为警告提示工具添加连接线 1. 在 AlertToolTip 中添加了带有连接器样式的 BoxShadow 组件 2. 实现了视觉上连接工具提示和目标元素的连接线 3. 使用适当的间距和边距将连接线定位在工具提示上方 4. 将边框不透明度从 0.05 增加到 0.1 以提高可见性 5. 在深色模式下更新连接器背景颜色为纯深灰色 (RGB 51,51,51) Log: 在警告提示工具与其目标元素之间添加了视觉连接线 Influence: 1. 测试带有连接线的警告提示工具显示 2. 验证连接线相对于工具提示和目标元素的定位 3. 检查连接线在浅色和深色主题下的外观 4. 验证连接线样式包括阴影、边框和颜色 5. 测试带有新连接线元素的工具提示动画 6. 确保连接线不会干扰工具提示功能 PMS: BUG-334879
1 parent 7af30e7 commit e59a1e3

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

qt6/src/qml/AlertToolTip.qml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,25 @@ ToolTip {
5050
// NumberAnimation { properties: "opacity"; from: 1.0; to: 0.0 }
5151
NumberAnimation { properties: "y"; from: control.target.height + DS.Style.control.spacing ; to: control.target.height }
5252
}
53+
54+
BoxShadow {
55+
id: line
56+
property D.Palette dropShadowColor: DS.Style.alertToolTip.connecterdropShadow
57+
property D.Palette backgroundColor: DS.Style.alertToolTip.connecterBackground
58+
property D.Palette borderColor: DS.Style.control.border
59+
y: - height * (0.75) - control.topMargin - control.topPadding
60+
width: DS.Style.alertToolTip.connectorWidth
61+
height: DS.Style.alertToolTip.connectorHeight
62+
shadowBlur: 4
63+
shadowOffsetY: 2
64+
shadowColor: D.ColorSelector.dropShadowColor
65+
cornerRadius: DS.Style.control.radius
66+
67+
Rectangle {
68+
anchors.fill: parent
69+
color: line.D.ColorSelector.backgroundColor
70+
border.color: line.D.ColorSelector.borderColor
71+
border.width: 1
72+
}
73+
}
5374
}

qt6/src/qml/FlowStyle.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ QtObject {
1515
property real focusBorderPaddings: 1
1616

1717
property D.Palette border: D.Palette {
18-
normal: Qt.rgba(0, 0, 0, 0.05)
19-
normalDark: Qt.rgba(0, 0, 0, 0.05)
18+
normal: Qt.rgba(0, 0, 0, 0.1)
19+
normalDark: Qt.rgba(0, 0, 0, 0.1)
2020
}
2121

2222
function implicitWidth(control) {
@@ -635,7 +635,7 @@ QtObject {
635635

636636
property D.Palette connecterBackground: D.Palette {
637637
normal: Qt.rgba(1, 1, 1, 1)
638-
normalDark: Qt.rgba(0, 0, 0, 0.1)
638+
normalDark: Qt.rgba(51 / 255.0, 51 / 255.0, 51 / 255.0, 1)
639639
}
640640

641641
property D.Palette dropShadow: D.Palette {

0 commit comments

Comments
 (0)