mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Add loader to ScreenCorner, proper position for SidePanel, update Settings & NPanel to only display one NPanel at a time (latest one)
This commit is contained in:
+12
-1
@@ -85,7 +85,18 @@ PanelWindow {
|
||||
icon: "widgets"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: function () {
|
||||
sidePanel.isLoaded = !sidePanel.isLoaded
|
||||
// Map this button's center to the screen and open the side panel below it
|
||||
const localCenterX = width / 2
|
||||
const localCenterY = height / 2
|
||||
const globalPoint = mapToItem(null, localCenterX, localCenterY)
|
||||
if (sidePanel.isLoaded) {
|
||||
sidePanel.isLoaded = false
|
||||
} else if (sidePanel.openAt) {
|
||||
sidePanel.openAt(globalPoint.x, screen)
|
||||
} else {
|
||||
// Fallback: toggle if API unavailable
|
||||
sidePanel.isLoaded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user