forked from Shinonome/dots-hyprland
fix right sidebar esc to close
This commit is contained in:
@@ -65,6 +65,13 @@ Scope {
|
|||||||
width: sidebarWidth - Appearance.sizes.hyprlandGapsOut - Appearance.sizes.elevationMargin
|
width: sidebarWidth - Appearance.sizes.hyprlandGapsOut - Appearance.sizes.elevationMargin
|
||||||
height: parent.height - Appearance.sizes.hyprlandGapsOut * 2
|
height: parent.height - Appearance.sizes.hyprlandGapsOut * 2
|
||||||
|
|
||||||
|
focus: GlobalStates.sidebarRightOpen
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if (event.key === Qt.Key_Escape) {
|
||||||
|
sidebarRoot.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
implicitHeight: sidebarRightBackground.implicitHeight
|
implicitHeight: sidebarRightBackground.implicitHeight
|
||||||
implicitWidth: sidebarRightBackground.implicitWidth
|
implicitWidth: sidebarRightBackground.implicitWidth
|
||||||
@@ -81,13 +88,6 @@ Scope {
|
|||||||
color: Appearance.colors.colLayer0
|
color: Appearance.colors.colLayer0
|
||||||
radius: Appearance.rounding.screenRounding - Appearance.sizes.hyprlandGapsOut + 1
|
radius: Appearance.rounding.screenRounding - Appearance.sizes.hyprlandGapsOut + 1
|
||||||
|
|
||||||
Keys.onPressed: (event) => {
|
|
||||||
if (event.key === Qt.Key_Escape) {
|
|
||||||
sidebarRoot.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: sidebarPadding
|
spacing: sidebarPadding
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
Reference in New Issue
Block a user