From a749ea70962324f5d7018a2c29faf985b5898f8d Mon Sep 17 00:00:00 2001 From: ly-sec Date: Sat, 12 Jul 2025 15:16:10 +0200 Subject: [PATCH] Fix Sidepanel closing --- Widgets/Sidebar/Button.qml | 10 ++++++++-- Widgets/Sidebar/Panel/PanelPopup.qml | 13 ++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Widgets/Sidebar/Button.qml b/Widgets/Sidebar/Button.qml index 0330803..f9d3ee7 100644 --- a/Widgets/Sidebar/Button.qml +++ b/Widgets/Sidebar/Button.qml @@ -26,8 +26,14 @@ Item { if (sidebarPopup.settingsModal && sidebarPopup.settingsModal.visible) { sidebarPopup.settingsModal.visible = false; } - if (sidebarPopup.wallpaperManagerModal && sidebarPopup.wallpaperManagerModal.visible) { - sidebarPopup.wallpaperManagerModal.visible = false; + if (sidebarPopup.wallpaperPanelModal && sidebarPopup.wallpaperPanelModal.visible) { + sidebarPopup.wallpaperPanelModal.visible = false; + } + if (sidebarPopup.wifiPanelModal && sidebarPopup.wifiPanelModal.visible) { + sidebarPopup.wifiPanelModal.visible = false; + } + if (sidebarPopup.bluetoothPanelModal && sidebarPopup.bluetoothPanelModal.visible) { + sidebarPopup.bluetoothPanelModal.visible = false; } sidebarPopup.hidePopup(); } else { diff --git a/Widgets/Sidebar/Panel/PanelPopup.qml b/Widgets/Sidebar/Panel/PanelPopup.qml index 60f8aff..df631ff 100644 --- a/Widgets/Sidebar/Panel/PanelPopup.qml +++ b/Widgets/Sidebar/Panel/PanelPopup.qml @@ -22,7 +22,7 @@ PanelWindow { // Animation properties property real slideOffset: width property bool isAnimating: false - + function showAt() { if (!visible) { visible = true; @@ -90,6 +90,9 @@ PanelWindow { } property alias settingsModal: settingsModal + property alias wallpaperPanelModal: wallpaperPanelModal + property alias wifiPanelModal: wifiPanel.panel + property alias bluetoothPanelModal: bluetoothPanel.panel SettingsModal { id: settingsModal } @@ -193,7 +196,7 @@ PanelWindow { anchors.fill: parent hoverEnabled: true cursorShape: Qt.PointingHandCursor - onClicked: wifiPanelModal.showAt() + onClicked: wifiPanel.showAt() } } @@ -223,7 +226,7 @@ PanelWindow { anchors.fill: parent hoverEnabled: true cursorShape: Qt.PointingHandCursor - onClicked: bluetoothPanelModal.showAt() + onClicked: bluetoothPanel.showAt() } } } @@ -232,11 +235,11 @@ PanelWindow { // Hidden panel components for modal functionality WifiPanel { - id: wifiPanelModal + id: wifiPanel visible: false } BluetoothPanel { - id: bluetoothPanelModal + id: bluetoothPanel visible: false }