forked from Shinonome/dots-hyprland
make buttons ripple
This commit is contained in:
@@ -7,25 +7,14 @@ import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Button {
|
||||
RippleButton {
|
||||
id: button
|
||||
|
||||
required default property Item content
|
||||
property bool extraActiveCondition: false
|
||||
|
||||
PointingHandInteraction{}
|
||||
|
||||
implicitHeight: Math.max(content.implicitHeight, 26, content.implicitHeight)
|
||||
implicitWidth: Math.max(content.implicitHeight, 26, content.implicitWidth)
|
||||
implicitWidth: implicitHeight
|
||||
contentItem: content
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.full
|
||||
color: (button.down || extraActiveCondition) ? Appearance.colors.colLayer1Active :
|
||||
(button.hovered ? Appearance.colors.colLayer1Hover :
|
||||
ColorUtils.transparentize(Appearance.colors.colLayer1, 1))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user