1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-10 05:03:28 -04:00

refactor(framemode): connected surfaces

This commit is contained in:
purian23
2026-06-09 13:40:53 -04:00
parent 8856d45887
commit f8b32cc298
14 changed files with 1523 additions and 454 deletions
@@ -115,6 +115,7 @@ Item {
id: modalChrome
modalHandle: root.modalHandle
claimPrefix: root.layerNamespace + ":modal"
surfaceKind: "modal"
screenName: root._currentScreenName()
enabled: root.frameOwnsConnectedChrome
active: root.shouldBeVisible
@@ -125,17 +126,38 @@ Item {
}
function _publishModalChromeState() {
const presented = shouldBeVisible || contentWindow.visible;
const phase = !presented ? "hidden" : (!shouldBeVisible && contentWindow.visible ? "closing" : (!contentWindow.visible ? "opening" : "open"));
const bodyRect = {
"x": alignedX,
"y": alignedY,
"width": alignedWidth,
"height": alignedHeight
};
const animationOffset = {
"x": modalContainer ? modalContainer.animX : 0,
"y": modalContainer ? modalContainer.animY : 0
};
const state = {
"visible": shouldBeVisible || contentWindow.visible,
"kind": "modal",
"screenName": root._currentScreenName(),
"phase": phase,
"visible": presented,
"presented": presented,
"barSide": resolvedConnectedBarSide,
"bodyRect": bodyRect,
"animationOffset": animationOffset,
"scale": 1,
"opacity": Theme.connectedSurfaceColor.a,
"bodyX": alignedX,
"bodyY": alignedY,
"bodyW": alignedWidth,
"bodyH": alignedHeight,
"animX": modalContainer ? modalContainer.animX : 0,
"animY": modalContainer ? modalContainer.animY : 0,
"animX": animationOffset.x,
"animY": animationOffset.y,
"omitStartConnector": false,
"omitEndConnector": false
"omitEndConnector": false,
"dockRetractSide": root._dockBlocksEmergence ? resolvedConnectedBarSide : ""
};
return modalChrome.publish(state);
}