1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 05:52:50 -05:00

popout: use mapToItem instead of mapToGlobal for popout positioning

fixes #1152
This commit is contained in:
bbedward
2025-12-25 12:50:26 -05:00
parent ec6db7962a
commit fd839059c0
11 changed files with 104 additions and 112 deletions

View File

@@ -1,25 +1,17 @@
function setTriggerPosition(root, x, y, width, section, screen) {
root.triggerX = x
root.triggerY = y
root.triggerWidth = width
root.triggerSection = section
root.triggerScreen = screen
}
function openWithSection(root, section) {
if (root.shouldBeVisible) {
root.close()
} else {
root.expandedSection = section
root.open()
}
if (root.shouldBeVisible) {
root.close();
} else {
root.expandedSection = section;
root.open();
}
}
function toggleSection(root, section) {
if (root.expandedSection === section) {
root.expandedSection = ""
root.expandedWidgetIndex = -1
} else {
root.expandedSection = section
}
if (root.expandedSection === section) {
root.expandedSection = "";
root.expandedWidgetIndex = -1;
} else {
root.expandedSection = section;
}
}