dots-hyprland/.config/quickshell/modules/sidebarRight/QuickToggleButton.qml
2025-04-14 23:35:40 +02:00

33 lines
885 B
QML

import "../common"
import "../common/widgets"
import QtQuick
import QtQuick.Controls
Button {
id: button
property bool toggled
signal clicked()
implicitWidth: 40
implicitHeight: 40
onClicked: {
}
background: Rectangle {
anchors.fill: parent
radius: Appearance.rounding.full
color: toggled ?
(button.down ? Appearance.colors.colPrimaryActive : button.hovered ? Appearance.colors.colPrimaryHover : Appearance.m3colors.m3primary) :
(button.down ? Appearance.colors.colLayer1Active : button.hovered ? Appearance.colors.colLayer1Hover : Appearance.transparentize(Appearance.colors.colLayer1Hover, 1))
MaterialSymbol {
anchors.centerIn: parent
text: "coffee"
color: toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1
}
}
}