Files
illogical-impulse/.config/quickshell/modules/sidebarRight/quickToggles/QuickToggleButton.qml
T
2025-05-22 19:01:20 +02:00

32 lines
874 B
QML

import "root:/modules/common"
import "root:/modules/common/widgets"
import "root:/modules/common/functions/color_utils.js" as ColorUtils
import QtQuick
import QtQuick.Controls
import Quickshell.Io
RippleButton {
id: button
property string buttonIcon
toggled: false
buttonRadius: Appearance?.rounding?.full ?? 9999
implicitWidth: 40
implicitHeight: 40
contentItem: MaterialSymbol {
anchors.centerIn: parent
iconSize: Appearance.font.pixelSize.larger
fill: toggled ? 1 : 0
color: toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: buttonIcon
Behavior on color {
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
}
}
}