forked from Shinonome/dots-hyprland
SecondaryTabButton: make ripple radial gradient
This commit is contained in:
@@ -107,13 +107,29 @@ TabButton {
|
|||||||
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Item {
|
||||||
id: ripple
|
id: ripple
|
||||||
|
width: ripple.implicitWidth
|
||||||
radius: Appearance.rounding.full
|
height: ripple.implicitHeight
|
||||||
color: root.colRipple
|
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
|
property real implicitWidth: 0
|
||||||
|
property real implicitHeight: 0
|
||||||
|
visible: width > 0 && height > 0
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
animation: Appearance?.animation.elementMoveFast.colorAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
RadialGradient {
|
||||||
|
anchors.fill: parent
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop { position: 0.0; color: root.colRipple }
|
||||||
|
GradientStop { position: 0.3; color: root.colRipple }
|
||||||
|
GradientStop { position: 0.5 ; color: Qt.rgba(root.colRipple.r, root.colRipple.g, root.colRipple.b, 0) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
transform: Translate {
|
transform: Translate {
|
||||||
x: -ripple.width / 2
|
x: -ripple.width / 2
|
||||||
y: -ripple.height / 2
|
y: -ripple.height / 2
|
||||||
|
|||||||
Reference in New Issue
Block a user