bar tooltip: fix placement for autohide

This commit is contained in:
end-4
2025-08-11 22:33:11 +07:00
parent 459dab65ca
commit e8ebf5af73
@@ -1,9 +1,5 @@
import qs
import qs.modules.common import qs.modules.common
import qs.modules.common.widgets
import qs.services
import QtQuick import QtQuick
import QtQuick.Layouts
import QtQuick.Effects import QtQuick.Effects
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
@@ -20,7 +16,6 @@ LazyLoader {
id: popupWindow id: popupWindow
visible: true visible: true
color: "transparent" color: "transparent"
exclusiveZone: 0
anchors.left: true anchors.left: true
anchors.top: !Config.options.bar.bottom anchors.top: !Config.options.bar.bottom
@@ -29,11 +24,15 @@ LazyLoader {
implicitWidth: popupBackground.implicitWidth + Appearance.sizes.hyprlandGapsOut * 2 implicitWidth: popupBackground.implicitWidth + Appearance.sizes.hyprlandGapsOut * 2
implicitHeight: popupBackground.implicitHeight + Appearance.sizes.hyprlandGapsOut * 2 implicitHeight: popupBackground.implicitHeight + Appearance.sizes.hyprlandGapsOut * 2
exclusionMode: ExclusionMode.Ignore
exclusiveZone: 0
margins { margins {
left: root.QsWindow?.mapFromItem( left: root.QsWindow?.mapFromItem(
root.hoverTarget, root.hoverTarget,
(root.hoverTarget.width - popupBackground.implicitWidth) / 2, 0 (root.hoverTarget.width - popupBackground.implicitWidth) / 2, 0
).x ).x
top: Config?.options.bar.bottom ? 0 : Appearance.sizes.barHeight
bottom: Config?.options.bar.bottom ? Appearance.sizes.barHeight : 0
} }
WlrLayershell.namespace: "quickshell:popup" WlrLayershell.namespace: "quickshell:popup"
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay