bouncy button group for toggles

This commit is contained in:
end-4
2025-05-24 13:10:49 +02:00
parent e7e55e7f95
commit 0cf12bc3be
6 changed files with 64 additions and 37 deletions
@@ -17,21 +17,12 @@ QuickToggleButton {
Network.networkStrength > 20 ? "network_wifi_1_bar" :
"signal_wifi_0_bar"
) : "signal_wifi_off"
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.RightButton | Qt.LeftButton
onClicked: (mouse) =>{
if (mouse.button === Qt.LeftButton) {
toggleNetwork.running = true
}
if (mouse.button === Qt.RightButton) {
Hyprland.dispatch(`exec ${ConfigOptions.apps.network}`)
Hyprland.dispatch("global quickshell:sidebarRightClose")
}
}
hoverEnabled: false
propagateComposedEvents: true
cursorShape: Qt.PointingHandCursor
onClicked: {
toggleNetwork.running = true
}
altAction: () => {
Hyprland.dispatch(`exec ${ConfigOptions.apps.network}`)
Hyprland.dispatch("global quickshell:sidebarRightClose")
}
Process {
id: toggleNetwork