Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions qt6/src/qml/private/ButtonPanel.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

Expand Down Expand Up @@ -49,30 +49,4 @@ BoxPanel {
GradientStop { position: 0.0; color: control.D.ColorSelector.color1 }
GradientStop { position: 0.96; color: control.D.ColorSelector.color2 }
}

CicleSpreadAnimation {
id: hoverAnimation
anchors.fill: parent
visible: enableAnimation

Rectangle {
anchors.fill: parent
radius: control.radius
// gradient: control.D.ColorSelector.color1 === control.D.ColorSelector.color2 ? null : hoverBackgroundGradient
color: control.D.ColorSelector.color1
}
function triggle() {
if (button.hovered) {
var pos = D.DTK.cursorPosition()
hoverAnimation.centerPoint = hoverAnimation.mapFromGlobal(pos.x, pos.y)
hoverAnimation.start()
} else {
hoverAnimation.stop()
}
}

Component.onCompleted: {
button.hoveredChanged.connect(hoverAnimation.triggle)
}
}
}
Loading