Fix Sidepanel closing

This commit is contained in:
ly-sec 2025-07-12 15:16:10 +02:00
parent aad16d7ea7
commit a749ea7096
2 changed files with 16 additions and 7 deletions

View file

@ -26,8 +26,14 @@ Item {
if (sidebarPopup.settingsModal && sidebarPopup.settingsModal.visible) { if (sidebarPopup.settingsModal && sidebarPopup.settingsModal.visible) {
sidebarPopup.settingsModal.visible = false; sidebarPopup.settingsModal.visible = false;
} }
if (sidebarPopup.wallpaperManagerModal && sidebarPopup.wallpaperManagerModal.visible) { if (sidebarPopup.wallpaperPanelModal && sidebarPopup.wallpaperPanelModal.visible) {
sidebarPopup.wallpaperManagerModal.visible = false; 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(); sidebarPopup.hidePopup();
} else { } else {

View file

@ -90,6 +90,9 @@ PanelWindow {
} }
property alias settingsModal: settingsModal property alias settingsModal: settingsModal
property alias wallpaperPanelModal: wallpaperPanelModal
property alias wifiPanelModal: wifiPanel.panel
property alias bluetoothPanelModal: bluetoothPanel.panel
SettingsModal { SettingsModal {
id: settingsModal id: settingsModal
} }
@ -193,7 +196,7 @@ PanelWindow {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: wifiPanelModal.showAt() onClicked: wifiPanel.showAt()
} }
} }
@ -223,7 +226,7 @@ PanelWindow {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: bluetoothPanelModal.showAt() onClicked: bluetoothPanel.showAt()
} }
} }
} }
@ -232,11 +235,11 @@ PanelWindow {
// Hidden panel components for modal functionality // Hidden panel components for modal functionality
WifiPanel { WifiPanel {
id: wifiPanelModal id: wifiPanel
visible: false visible: false
} }
BluetoothPanel { BluetoothPanel {
id: bluetoothPanelModal id: bluetoothPanel
visible: false visible: false
} }