Initial commit of the Quickshell desktop suite: bar, dock, launcher, settings, Control Center, dashboard, OSD, lock screen, desktop widgets, plugin host with the vendored Noctalia/Omarchy compatibility layer, helpers, packaging, tests and phase documentation. Includes the optimization work so far: usage widgets and dashboard gauges no longer animate continuously, desktop widgets pause while covered, system controls stop flickering on background polls, dock app matching uses an indexed catalog, and workspace ghosts are created only for occupied slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.1 KiB
QML
41 lines
1.1 KiB
QML
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);
|
|
}
|
|
}
|