diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-12 21:58:14 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-12 21:58:14 -0500 |
| commit | fc223237f0938c7904360d8c2674368bffa53373 (patch) | |
| tree | c00be67fbdfcfbff0c17183ecea766213cb19076 /modules/controlcenter/network/SimpleButton.qml | |
| parent | notifs/toasts: reverted all changes to notifications to c0ea060f (diff) | |
| download | caelestia-shell-fc223237f0938c7904360d8c2674368bffa53373.tar.gz caelestia-shell-fc223237f0938c7904360d8c2674368bffa53373.tar.bz2 caelestia-shell-fc223237f0938c7904360d8c2674368bffa53373.zip | |
controlcenter: wireless panel rewrite
Diffstat (limited to 'modules/controlcenter/network/SimpleButton.qml')
| -rw-r--r-- | modules/controlcenter/network/SimpleButton.qml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/controlcenter/network/SimpleButton.qml b/modules/controlcenter/network/SimpleButton.qml new file mode 100644 index 0000000..49ab2f4 --- /dev/null +++ b/modules/controlcenter/network/SimpleButton.qml @@ -0,0 +1,36 @@ +import qs.components +import qs.components.effects +import qs.config +import QtQuick + +StyledRect { + id: root + + property color onColor: Colours.palette.m3onSurface + property alias disabled: stateLayer.disabled + property alias text: label.text + property alias enabled: stateLayer.enabled + + implicitWidth: label.implicitWidth + Appearance.padding.normal * 2 + implicitHeight: label.implicitHeight + Appearance.padding.normal * 2 + radius: Appearance.rounding.normal + + StateLayer { + id: stateLayer + color: parent.onColor + function onClicked(): void { + if (parent.enabled !== false) { + parent.clicked(); + } + } + } + + StyledText { + id: label + anchors.centerIn: parent + color: parent.onColor + } + + signal clicked +} + |