mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
sidebar: wifi dialog: esc to close
This commit is contained in:
@@ -12,7 +12,14 @@ Rectangle {
|
||||
default property alias data: contentColumn.data
|
||||
property real backgroundHeight: 600
|
||||
property real backgroundAnimationMovementDistance: 60
|
||||
|
||||
signal dismiss()
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.key === Qt.Key_Escape) {
|
||||
root.dismiss();
|
||||
event.accepted = true;
|
||||
}
|
||||
}
|
||||
|
||||
color: root.show ? Appearance.colors.colScrim : ColorUtils.transparentize(Appearance.colors.colScrim)
|
||||
Behavior on color {
|
||||
|
||||
@@ -159,7 +159,12 @@ Item {
|
||||
anchors.fill: parent
|
||||
|
||||
active: root.showWifiDialog || item.visible
|
||||
onActiveChanged: if (active) item.show = true
|
||||
onActiveChanged: {
|
||||
if (active) {
|
||||
item.show = true;
|
||||
item.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
sourceComponent: WifiDialog {
|
||||
onDismiss: {
|
||||
|
||||
@@ -17,7 +17,7 @@ import Quickshell.Hyprland
|
||||
|
||||
WindowDialog {
|
||||
id: root
|
||||
|
||||
|
||||
WindowDialogTitle {
|
||||
text: Translation.tr("Connect to Wi-Fi")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user