From 90606d1b6da25b30c82f2667225dc240a3fe803f Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Sat, 6 Dec 2025 17:02:26 -0800 Subject: [PATCH] feat: straight up center that shit idk i dont want mouse event --- quickshell/Components/SystemTray.qml | 2 +- quickshell/Components/SystemTrayWrapper.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quickshell/Components/SystemTray.qml b/quickshell/Components/SystemTray.qml index 3041f4f7..5f3c3f5e 100644 --- a/quickshell/Components/SystemTray.qml +++ b/quickshell/Components/SystemTray.qml @@ -36,7 +36,7 @@ RowLayout { hoverEnabled: true onClicked: function(mouseEvent) { - var m = delegateItem.QsWindow.mapFromItem(delegateItem, mouseEvent.x, mouseEvent.y); + var m = delegateItem.QsWindow.mapFromItem(delegateItem, delegateItem.width/2.0, delegateItem.height/2.0); var offset = popupLoader.item.width / 2.0; popupLoader.clicky = m.x - offset; if (openItemId == modelData.id) { diff --git a/quickshell/Components/SystemTrayWrapper.qml b/quickshell/Components/SystemTrayWrapper.qml index 9f7e8117..3fa6801b 100644 --- a/quickshell/Components/SystemTrayWrapper.qml +++ b/quickshell/Components/SystemTrayWrapper.qml @@ -20,7 +20,7 @@ Item { hoverEnabled: true onClicked: function(mouseEvent) { - var m = root.QsWindow.mapFromItem(ma, mouseEvent.x, mouseEvent.y); + var m = root.QsWindow.mapFromItem(ma, ma.width/2.0, ma.height/2.0); var offset = wrapperPopup.width / 2.0; wrapperPopup.clicky = m.x - offset; wrapperPopup.visible = !wrapperPopup.visible