forked from Shinonome/dots-hyprland
make buttons ripple
This commit is contained in:
@@ -6,28 +6,13 @@ import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Button {
|
||||
RippleButton {
|
||||
id: button
|
||||
|
||||
property string buttonText
|
||||
implicitHeight: 30
|
||||
implicitWidth: buttonTextWidget.implicitWidth + 15 * 2
|
||||
|
||||
PointingHandInteraction {}
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.full
|
||||
color: (button.down && button.enabled) ? Appearance.colors.colLayer1Active :
|
||||
((button.hovered && button.enabled) ? Appearance.colors.colLayer1Hover :
|
||||
ColorUtils.transparentize(Appearance.m3colors.m3surfaceContainerHigh, 1))
|
||||
|
||||
Behavior on color {
|
||||
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
buttonRadius: Appearance.rounding.full
|
||||
|
||||
contentItem: StyledText {
|
||||
id: buttonTextWidget
|
||||
|
||||
Reference in New Issue
Block a user