mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-03 11:02:08 -04:00
Sync up Frame w/Master branch updates
This commit is contained in:
@@ -47,6 +47,7 @@ Item {
|
||||
|
||||
readonly property var contentLoader: impl.item ? impl.item.contentLoader : _fallbackContentLoader
|
||||
readonly property var overlayLoader: impl.item ? impl.item.overlayLoader : _fallbackOverlayLoader
|
||||
readonly property var backgroundWindow: impl.item ? impl.item.backgroundWindow : null
|
||||
|
||||
Loader {
|
||||
id: _fallbackContentLoader
|
||||
|
||||
@@ -14,6 +14,7 @@ Item {
|
||||
property alias contentLoader: contentLoader
|
||||
property Component overlayContent: null
|
||||
property alias overlayLoader: overlayLoader
|
||||
readonly property alias backgroundWindow: contentWindow
|
||||
property real popupWidth: 400
|
||||
property real popupHeight: 300
|
||||
property real triggerX: 0
|
||||
@@ -222,8 +223,6 @@ Item {
|
||||
readonly property real contentAnimX: contentContainer.animX
|
||||
readonly property real contentAnimY: contentContainer.animY
|
||||
|
||||
property bool _fullSyncPending: false
|
||||
|
||||
// ─── ConnectedModeState sync ────────────────────────────────────────────
|
||||
function _syncPopoutChromeState() {
|
||||
if (!root.frameOwnsConnectedChrome) {
|
||||
@@ -262,20 +261,8 @@ Item {
|
||||
ConnectedModeState.setPopoutBody(_chromeClaimId, root.alignedX, root.renderedAlignedY, root.alignedWidth, root.renderedAlignedHeight);
|
||||
}
|
||||
|
||||
function _flushFullSync() {
|
||||
_fullSyncPending = false;
|
||||
if (root && typeof root._syncPopoutChromeState === "function")
|
||||
root._syncPopoutChromeState();
|
||||
}
|
||||
|
||||
function _queueFullSync() {
|
||||
if (_fullSyncPending)
|
||||
return;
|
||||
_fullSyncPending = true;
|
||||
Qt.callLater(() => {
|
||||
if (root && typeof root._flushFullSync === "function")
|
||||
root._flushFullSync();
|
||||
});
|
||||
_syncPopoutChromeState();
|
||||
}
|
||||
|
||||
onAlignedXChanged: _queueFullSync()
|
||||
@@ -349,15 +336,13 @@ Item {
|
||||
|
||||
contentWindow.visible = true;
|
||||
|
||||
Qt.callLater(() => {
|
||||
animationsEnabled = true;
|
||||
shouldBeVisible = true;
|
||||
if (shouldBeVisible && screen) {
|
||||
contentWindow.visible = true;
|
||||
PopoutManager.showPopout(popoutHandle);
|
||||
opened();
|
||||
}
|
||||
});
|
||||
animationsEnabled = true;
|
||||
shouldBeVisible = true;
|
||||
if (shouldBeVisible && screen) {
|
||||
contentWindow.visible = true;
|
||||
PopoutManager.showPopout(popoutHandle);
|
||||
opened();
|
||||
}
|
||||
}
|
||||
|
||||
function close() {
|
||||
|
||||
@@ -13,6 +13,7 @@ Item {
|
||||
property alias contentLoader: contentLoader
|
||||
property Component overlayContent: null
|
||||
property alias overlayLoader: overlayLoader
|
||||
readonly property alias backgroundWindow: backgroundWindow
|
||||
property real popupWidth: 400
|
||||
property real popupHeight: 300
|
||||
property real triggerX: 0
|
||||
@@ -181,15 +182,13 @@ Item {
|
||||
_surfaceMarginLeft = alignedX - shadowBuffer;
|
||||
_surfaceW = alignedWidth + shadowBuffer * 2;
|
||||
}
|
||||
Qt.callLater(() => {
|
||||
if (shouldBeVisible && screen) {
|
||||
if (useBackgroundWindow)
|
||||
backgroundWindow.visible = true;
|
||||
contentWindow.visible = true;
|
||||
PopoutManager.showPopout(popoutHandle);
|
||||
opened();
|
||||
}
|
||||
});
|
||||
if (shouldBeVisible && screen) {
|
||||
if (useBackgroundWindow)
|
||||
backgroundWindow.visible = true;
|
||||
contentWindow.visible = true;
|
||||
PopoutManager.showPopout(popoutHandle);
|
||||
opened();
|
||||
}
|
||||
}
|
||||
|
||||
function close() {
|
||||
|
||||
@@ -55,7 +55,7 @@ Item {
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.targetWindow
|
||||
target: root.targetWindow ?? null
|
||||
function onVisibleChanged() {
|
||||
if (root.targetWindow && root.targetWindow.visible) {
|
||||
root._region = null;
|
||||
|
||||
Reference in New Issue
Block a user