ControlCenter: respect settings for opening position

This commit is contained in:
ItsLemmy
2025-11-04 16:50:17 -05:00
parent 3b0b3fb57e
commit 8182e0c36b
3 changed files with 24 additions and 12 deletions
+6 -2
View File
@@ -188,10 +188,14 @@ Item {
IpcHandler {
target: "controlCenter"
function toggle() {
// Will attempt to open the panel next to the bar button if any.
root.withTargetScreen(screen => {
var controlCenterPanel = PanelService.getPanel("controlCenterPanel", screen)
controlCenterPanel.toggle(null, "ControlCenter")
if (Settings.data.controlCenter.position === "close_to_bar_button") {
// Will attempt to open the panel next to the bar button if any.
controlCenterPanel.toggle(null, "ControlCenter")
} else {
controlCenterPanel.toggle()
}
})
}
}