pragma Singleton import QtQuick import Quickshell import "../../../../core" as Core import "../../../../services" as GS // glassMxrph stand-in: tooltips of bar widgets use the shell's hover popout // (it hangs from the bar); tooltips elsewhere are not shown. Singleton { id: root property var current: null function inBar(target) { const w = target && target.QsWindow ? target.QsWindow.window : null; return !!w && GS.TrayService.barWindows.includes(w); } function show(target, content, direction, delay, fontFamily) { if (!target || !content || !inBar(target)) return; current = target; Core.PopoutState.hover(target, "tooltip", String(content)); } function hide(target) { if (target && current !== target) return; if (current) Core.PopoutState.unhover(current); current = null; } function hideImmediately() { current = null; Core.PopoutState.close(); } function updateContent(newContent) { updateText(newContent); } function updateText(newText) { if (current && Core.PopoutState.anchor === current) Core.PopoutState.text = String(newText); } }