mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
popout: use mapToItem instead of mapToGlobal for popout positioning
fixes #1152
This commit is contained in:
@@ -57,8 +57,6 @@ DankPopout {
|
||||
const contentHeight = contentLoader.item && contentLoader.item.implicitHeight > 0 ? contentLoader.item.implicitHeight + 20 : 400;
|
||||
return Math.min(maxHeight, contentHeight);
|
||||
}
|
||||
triggerX: 0
|
||||
triggerY: 0
|
||||
triggerWidth: 80
|
||||
positioning: ""
|
||||
screen: triggerScreen
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user