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

frame(Connected): Fix connected regression & Ran Performance pass

This commit is contained in:
purian23
2026-05-01 16:31:35 -04:00
parent b10023f18e
commit 339481893b
8 changed files with 166 additions and 90 deletions

View File

@@ -93,6 +93,24 @@ Item {
signal dialogClosed signal dialogClosed
signal backgroundClicked signal backgroundClicked
Timer {
id: _fullSyncTimer
interval: 0
onTriggered: root._flushFullSync()
}
Timer {
id: _animSyncTimer
interval: 0
onTriggered: root._flushAnimSync()
}
Timer {
id: _bodySyncTimer
interval: 0
onTriggered: root._flushBodySync()
}
property bool animationsEnabled: true property bool animationsEnabled: true
property string _chromeClaimId: "" property string _chromeClaimId: ""
@@ -147,10 +165,7 @@ Item {
if (_fullSyncPending) if (_fullSyncPending)
return; return;
_fullSyncPending = true; _fullSyncPending = true;
Qt.callLater(() => { _fullSyncTimer.restart();
if (root && typeof root._flushFullSync === "function")
root._flushFullSync();
});
} }
property bool _animSyncQueued: false property bool _animSyncQueued: false
@@ -158,10 +173,7 @@ Item {
if (_animSyncQueued) if (_animSyncQueued)
return; return;
_animSyncQueued = true; _animSyncQueued = true;
Qt.callLater(() => { _animSyncTimer.restart();
if (root && typeof root._flushAnimSync === "function")
root._flushAnimSync();
});
} }
function _flushAnimSync() { function _flushAnimSync() {
_animSyncQueued = false; _animSyncQueued = false;
@@ -173,10 +185,7 @@ Item {
if (_bodySyncQueued) if (_bodySyncQueued)
return; return;
_bodySyncQueued = true; _bodySyncQueued = true;
Qt.callLater(() => { _bodySyncTimer.restart();
if (root && typeof root._flushBodySync === "function")
root._flushBodySync();
});
} }
function _flushBodySync() { function _flushBodySync() {
_bodySyncQueued = false; _bodySyncQueued = false;
@@ -483,8 +492,8 @@ Item {
readonly property real s: Math.min(1, modalContainer.scaleValue) readonly property real s: Math.min(1, modalContainer.scaleValue)
blurX: modalContainer.x + modalContainer.width * (1 - s) * 0.5 + Theme.snap(modalContainer.animX, root.dpr) blurX: modalContainer.x + modalContainer.width * (1 - s) * 0.5 + Theme.snap(modalContainer.animX, root.dpr)
blurY: modalContainer.y + modalContainer.height * (1 - s) * 0.5 + Theme.snap(modalContainer.animY, root.dpr) blurY: modalContainer.y + modalContainer.height * (1 - s) * 0.5 + Theme.snap(modalContainer.animY, root.dpr)
blurWidth: (root.shouldBeVisible && animatedContent.publishedOpacity > 0 && !root.frameOwnsConnectedChrome) ? modalContainer.width * s : 0 blurWidth: (root.shouldBeVisible && !root.frameOwnsConnectedChrome) ? modalContainer.width * s : 0
blurHeight: (root.shouldBeVisible && animatedContent.publishedOpacity > 0 && !root.frameOwnsConnectedChrome) ? modalContainer.height * s : 0 blurHeight: (root.shouldBeVisible && !root.frameOwnsConnectedChrome) ? modalContainer.height * s : 0
blurRadius: root.effectiveCornerRadius blurRadius: root.effectiveCornerRadius
} }

View File

@@ -241,8 +241,8 @@ Item {
readonly property real s: Math.min(1, modalContainer.scaleValue) readonly property real s: Math.min(1, modalContainer.scaleValue)
blurX: modalContainer.x + modalContainer.width * (1 - s) * 0.5 + Theme.snap(modalContainer.animX, root.dpr) blurX: modalContainer.x + modalContainer.width * (1 - s) * 0.5 + Theme.snap(modalContainer.animX, root.dpr)
blurY: modalContainer.y + modalContainer.height * (1 - s) * 0.5 + Theme.snap(modalContainer.animY, root.dpr) blurY: modalContainer.y + modalContainer.height * (1 - s) * 0.5 + Theme.snap(modalContainer.animY, root.dpr)
blurWidth: (shouldBeVisible && animatedContent.publishedOpacity > 0) ? modalContainer.width * s : 0 blurWidth: shouldBeVisible ? modalContainer.width * s : 0
blurHeight: (shouldBeVisible && animatedContent.publishedOpacity > 0) ? modalContainer.height * s : 0 blurHeight: shouldBeVisible ? modalContainer.height * s : 0
blurRadius: root.cornerRadius blurRadius: root.cornerRadius
} }
@@ -400,8 +400,6 @@ Item {
anchors.fill: parent anchors.fill: parent
clip: false clip: false
property real publishedOpacity: root.shouldBeVisible ? 1 : 0
opacity: root.shouldBeVisible ? 1 : 0 opacity: root.shouldBeVisible ? 1 : 0
scale: modalContainer.scaleValue scale: modalContainer.scaleValue
x: Theme.snap(modalContainer.animX, root.dpr) + (parent.width - width) * (1 - modalContainer.scaleValue) * 0.5 x: Theme.snap(modalContainer.animX, root.dpr) + (parent.width - width) * (1 - modalContainer.scaleValue) * 0.5
@@ -416,15 +414,6 @@ Item {
} }
} }
Behavior on publishedOpacity {
enabled: root.animationsEnabled
NumberAnimation {
duration: animationDuration
easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
}
}
ElevationShadow { ElevationShadow {
id: modalShadowLayer id: modalShadowLayer
anchors.fill: parent anchors.fill: parent

View File

@@ -191,6 +191,24 @@ Item {
signal dialogClosed signal dialogClosed
Timer {
id: _fullSyncTimer
interval: 0
onTriggered: root._flushFullSync()
}
Timer {
id: _animSyncTimer
interval: 0
onTriggered: root._flushAnimSync()
}
Timer {
id: _bodySyncTimer
interval: 0
onTriggered: root._flushBodySync()
}
property string _chromeClaimId: "" property string _chromeClaimId: ""
property bool _fullSyncPending: false property bool _fullSyncPending: false
@@ -243,10 +261,7 @@ Item {
if (_fullSyncPending) if (_fullSyncPending)
return; return;
_fullSyncPending = true; _fullSyncPending = true;
Qt.callLater(() => { _fullSyncTimer.restart();
if (root && typeof root._flushFullSync === "function")
root._flushFullSync();
});
} }
property bool _animSyncQueued: false property bool _animSyncQueued: false
@@ -254,10 +269,7 @@ Item {
if (_animSyncQueued) if (_animSyncQueued)
return; return;
_animSyncQueued = true; _animSyncQueued = true;
Qt.callLater(() => { _animSyncTimer.restart();
if (root && typeof root._flushAnimSync === "function")
root._flushAnimSync();
});
} }
function _flushAnimSync() { function _flushAnimSync() {
_animSyncQueued = false; _animSyncQueued = false;
@@ -269,10 +281,7 @@ Item {
if (_bodySyncQueued) if (_bodySyncQueued)
return; return;
_bodySyncQueued = true; _bodySyncQueued = true;
Qt.callLater(() => { _bodySyncTimer.restart();
if (root && typeof root._flushBodySync === "function")
root._flushBodySync();
});
} }
function _flushBodySync() { function _flushBodySync() {
_bodySyncQueued = false; _bodySyncQueued = false;
@@ -625,8 +634,8 @@ Item {
readonly property real s: Math.min(1, contentContainer.scaleValue) readonly property real s: Math.min(1, contentContainer.scaleValue)
blurX: root._ccX + root.alignedWidth * (1 - s) * 0.5 + Theme.snap(contentContainer.animX, root.dpr) blurX: root._ccX + root.alignedWidth * (1 - s) * 0.5 + Theme.snap(contentContainer.animX, root.dpr)
blurY: root._ccY + root.alignedHeight * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr) blurY: root._ccY + root.alignedHeight * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr)
blurWidth: (root.spotlightOpen || root.isClosing) && contentWrapper.publishedOpacity > 0 && !root.frameOwnsConnectedChrome ? root.alignedWidth * s : 0 blurWidth: (root.spotlightOpen || root.isClosing) && !root.frameOwnsConnectedChrome ? root.alignedWidth * s : 0
blurHeight: (root.spotlightOpen || root.isClosing) && contentWrapper.publishedOpacity > 0 && !root.frameOwnsConnectedChrome ? root.alignedHeight * s : 0 blurHeight: (root.spotlightOpen || root.isClosing) && !root.frameOwnsConnectedChrome ? root.alignedHeight * s : 0
blurRadius: root.cornerRadius blurRadius: root.cornerRadius
} }

View File

@@ -353,8 +353,8 @@ Item {
readonly property real s: Math.min(1, modalContainer.publishedScale) readonly property real s: Math.min(1, modalContainer.publishedScale)
blurX: modalContainer.x + modalContainer.width * (1 - s) * 0.5 blurX: modalContainer.x + modalContainer.width * (1 - s) * 0.5
blurY: modalContainer.y + modalContainer.height * (1 - s) * 0.5 blurY: modalContainer.y + modalContainer.height * (1 - s) * 0.5
blurWidth: (contentVisible && modalContainer.publishedOpacity > 0) ? modalContainer.width * s : 0 blurWidth: contentVisible ? modalContainer.width * s : 0
blurHeight: (contentVisible && modalContainer.publishedOpacity > 0) ? modalContainer.height * s : 0 blurHeight: contentVisible ? modalContainer.height * s : 0
blurRadius: root.cornerRadius blurRadius: root.cornerRadius
} }
@@ -414,7 +414,6 @@ Item {
visible: _renderActive visible: _renderActive
property bool _renderActive: contentVisible property bool _renderActive: contentVisible
property real publishedOpacity: contentVisible ? 1 : 0
property real publishedScale: contentVisible ? 1 : 0.96 property real publishedScale: contentVisible ? 1 : 0.96
opacity: contentVisible ? 1 : 0 opacity: contentVisible ? 1 : 0
@@ -426,15 +425,7 @@ Item {
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
duration: Theme.modalAnimationDuration duration: Theme.modalAnimationDuration
easing.bezierCurve: contentVisible ? Theme.expressiveCurves.expressiveDefaultSpatial : Theme.expressiveCurves.emphasized easing.bezierCurve: contentVisible ? Theme.expressiveCurves.expressiveDefaultSpatial : Theme.expressiveCurves.emphasized
} onRunningChanged: if (!running && !root.contentVisible)
}
Behavior on publishedOpacity {
NumberAnimation {
easing.type: Easing.BezierSpline
duration: Theme.modalAnimationDuration
easing.bezierCurve: contentVisible ? Theme.expressiveCurves.expressiveDefaultSpatial : Theme.expressiveCurves.emphasized
onRunningChanged: if (!running && modalContainer.publishedOpacity === 0)
modalContainer._renderActive = false modalContainer._renderActive = false
} }
} }

View File

@@ -15,7 +15,7 @@ PanelWindow {
required property var targetScreen required property var targetScreen
screen: targetScreen screen: targetScreen
visible: true visible: _frameActive
WlrLayershell.namespace: "dms:frame" WlrLayershell.namespace: "dms:frame"
WlrLayershell.layer: WlrLayer.Top WlrLayershell.layer: WlrLayer.Top
@@ -33,14 +33,14 @@ PanelWindow {
readonly property var barEdges: { readonly property var barEdges: {
SettingsData.barConfigs; SettingsData.barConfigs;
return SettingsData.getActiveBarEdgesForScreen(win.screen); return SettingsData.getActiveBarEdgesForScreen(win.targetScreen);
} }
readonly property real _dpr: CompositorService.getScreenScale(win.screen) readonly property real _dpr: CompositorService.getScreenScale(win.targetScreen)
readonly property bool _frameActive: SettingsData.frameEnabled && SettingsData.isScreenInPreferences(win.screen, SettingsData.frameScreenPreferences) readonly property bool _frameActive: SettingsData.frameEnabled && SettingsData.isScreenInPreferences(win.targetScreen, SettingsData.frameScreenPreferences)
readonly property int _windowRegionWidth: win._regionInt(win.width) readonly property int _windowRegionWidth: win._regionInt(win.width)
readonly property int _windowRegionHeight: win._regionInt(win.height) readonly property int _windowRegionHeight: win._regionInt(win.height)
readonly property string _screenName: win.screen ? win.screen.name : "" readonly property string _screenName: win.targetScreen ? win.targetScreen.name : ""
readonly property var _dockState: ConnectedModeState.dockStates[win._screenName] || ConnectedModeState.emptyDockState readonly property var _dockState: ConnectedModeState.dockStates[win._screenName] || ConnectedModeState.emptyDockState
readonly property var _dockSlide: ConnectedModeState.dockSlides[win._screenName] || ({ readonly property var _dockSlide: ConnectedModeState.dockSlides[win._screenName] || ({
"x": 0, "x": 0,
@@ -1286,7 +1286,7 @@ PanelWindow {
} }
} }
Component.onCompleted: Qt.callLater(() => win._buildBlur()) Component.onCompleted: _blurRebuildTimer.restart()
Component.onDestruction: win._teardownBlur() Component.onDestruction: win._teardownBlur()
FrameBorder { FrameBorder {
@@ -1304,8 +1304,8 @@ PanelWindow {
anchors.fill: parent anchors.fill: parent
visible: win._connectedActive visible: win._connectedActive
opacity: win._surfaceOpacity opacity: win._surfaceOpacity
// Skip FBO when disabled, or when neither elevation nor alpha blend is active // Skip FBO when disabled, invisible, or when neither elevation nor alpha blend is active
layer.enabled: !win._disableLayer && (Theme.elevationEnabled || win._surfaceOpacity < 1) layer.enabled: win._connectedActive && !win._disableLayer && (Theme.elevationEnabled || win._surfaceOpacity < 1)
layer.smooth: false layer.smooth: false
layer.effect: MultiEffect { layer.effect: MultiEffect {

View File

@@ -74,35 +74,76 @@ Item {
readonly property real barY: impl.item ? impl.item.barY : 0 readonly property real barY: impl.item ? impl.item.barY : 0
readonly property real barWidth: impl.item ? impl.item.barWidth : 0 readonly property real barWidth: impl.item ? impl.item.barWidth : 0
readonly property real barHeight: impl.item ? impl.item.barHeight : 0 readonly property real barHeight: impl.item ? impl.item.barHeight : 0
readonly property bool useConnectedBackend: SettingsData.connectedFrameModeActive && !!screen && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences) readonly property bool useConnectedBackend: _usesConnectedBackendForScreen(screen)
readonly property var _desiredBackend: useConnectedBackend ? connectedComp : standaloneComp
property var _resolvedBackend: null property var _resolvedBackend: null
property bool _pendingOpen: false
Timer {
id: _pendingOpenTimer
interval: 0
onTriggered: {
if (!root._pendingOpen || !impl.item)
return;
root._pendingOpen = false;
impl.item.open();
}
}
onUseConnectedBackendChanged: _maybeResolveBackend() onUseConnectedBackendChanged: _maybeResolveBackend()
Component.onCompleted: _resolvedBackend = _desiredBackend Component.onCompleted: _resolvedBackend = _backendForScreen(screen)
Connections {
target: SettingsData
function onConnectedFrameModeActiveChanged() {
root._maybeResolveBackend();
}
function onFrameScreenPreferencesChanged() {
root._maybeResolveBackend();
}
}
function _usesConnectedBackendForScreen(targetScreen) {
return SettingsData.connectedFrameModeActive && !!targetScreen && SettingsData.isScreenInPreferences(targetScreen, SettingsData.frameScreenPreferences);
}
function _backendForScreen(targetScreen) {
return _usesConnectedBackendForScreen(targetScreen) ? connectedComp : standaloneComp;
}
// Defer Loader source-component swap until impl is fully closed; avoids // Defer Loader source-component swap until impl is fully closed; avoids
// tearing down a popout mid-animation when frame mode is toggled. // tearing down a popout mid-animation when frame mode is toggled.
function _maybeResolveBackend() { function _maybeResolveBackend() {
if (_resolvedBackend === _desiredBackend) _resolveBackendForScreen(screen);
}
function _resolveBackendForScreen(targetScreen) {
const backend = _backendForScreen(targetScreen);
if (_resolvedBackend === backend)
return; return;
if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing)) if (impl.item && (impl.item.shouldBeVisible || impl.item.isClosing))
return; return;
_resolvedBackend = _desiredBackend; _resolvedBackend = backend;
} }
function open() { function open() {
if (impl.item) _maybeResolveBackend();
if (impl.item) {
_pendingOpen = false;
impl.item.open(); impl.item.open();
return;
}
_pendingOpen = true;
} }
function close() { function close() {
_pendingOpen = false;
_pendingOpenTimer.stop();
if (impl.item) if (impl.item)
impl.item.close(); impl.item.close();
} }
function toggle() { function toggle() {
shouldBeVisible ? close() : open(); (shouldBeVisible || _pendingOpen) ? close() : open();
} }
function setBarContext(position, bottomGap) { function setBarContext(position, bottomGap) {
@@ -126,6 +167,7 @@ Item {
adjacentBarInfo = SettingsData.getAdjacentBarInfo(targetScreen, pos, barConfig); adjacentBarInfo = SettingsData.getAdjacentBarInfo(targetScreen, pos, barConfig);
setBarContext(pos, bottomGap); setBarContext(pos, bottomGap);
_resolveBackendForScreen(targetScreen);
} }
function updateSurfacePosition() { function updateSurfacePosition() {
@@ -185,6 +227,10 @@ Item {
it.effectiveBarBottomGap = Qt.binding(() => root.effectiveBarBottomGap); it.effectiveBarBottomGap = Qt.binding(() => root.effectiveBarBottomGap);
it.shouldBeVisible = root.shouldBeVisible; it.shouldBeVisible = root.shouldBeVisible;
if (root._primeContent && typeof it.primeContent === "function")
it.primeContent();
if (_pendingOpen)
_pendingOpenTimer.restart();
} }
function primeContent() { function primeContent() {

View File

@@ -84,6 +84,24 @@ Item {
signal popoutClosed signal popoutClosed
signal backgroundClicked signal backgroundClicked
Timer {
id: _fullSyncTimer
interval: 0
onTriggered: root._flushFullSync()
}
Timer {
id: _animSyncTimer
interval: 0
onTriggered: root._flushAnimSync()
}
Timer {
id: _bodySyncTimer
interval: 0
onTriggered: root._flushBodySync()
}
property var _lastOpenedScreen: null property var _lastOpenedScreen: null
property bool isClosing: false property bool isClosing: false
@@ -266,11 +284,11 @@ Item {
if (_fullSyncQueued) if (_fullSyncQueued)
return; return;
_fullSyncQueued = true; _fullSyncQueued = true;
Qt.callLater(() => { _fullSyncTimer.restart();
root._fullSyncQueued = false; }
if (typeof root._syncPopoutChromeState === "function") function _flushFullSync() {
root._syncPopoutChromeState(); _fullSyncQueued = false;
}); _syncPopoutChromeState();
} }
property bool _animSyncQueued: false property bool _animSyncQueued: false
@@ -278,10 +296,7 @@ Item {
if (_animSyncQueued) if (_animSyncQueued)
return; return;
_animSyncQueued = true; _animSyncQueued = true;
Qt.callLater(() => { _animSyncTimer.restart();
if (root && typeof root._flushAnimSync === "function")
root._flushAnimSync();
});
} }
function _flushAnimSync() { function _flushAnimSync() {
_animSyncQueued = false; _animSyncQueued = false;
@@ -294,10 +309,7 @@ Item {
if (_bodySyncQueued) if (_bodySyncQueued)
return; return;
_bodySyncQueued = true; _bodySyncQueued = true;
Qt.callLater(() => { _bodySyncTimer.restart();
if (root && typeof root._flushBodySync === "function")
root._flushBodySync();
});
} }
function _flushBodySync() { function _flushBodySync() {
_bodySyncQueued = false; _bodySyncQueued = false;
@@ -707,8 +719,8 @@ Item {
blurX: trackBlurFromBarEdge ? contentContainer.x + (contentContainer.barRight ? _dxClamp : 0) : contentContainer.x + contentContainer.width * (1 - s) * 0.5 + Theme.snap(contentContainer.animX, root.dpr) - contentContainer.horizontalConnectorExtent * s blurX: trackBlurFromBarEdge ? contentContainer.x + (contentContainer.barRight ? _dxClamp : 0) : contentContainer.x + contentContainer.width * (1 - s) * 0.5 + Theme.snap(contentContainer.animX, root.dpr) - contentContainer.horizontalConnectorExtent * s
blurY: trackBlurFromBarEdge ? contentContainer.y + (contentContainer.barBottom ? _dyClamp : 0) : contentContainer.y + contentContainer.height * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr) - contentContainer.verticalConnectorExtent * s blurY: trackBlurFromBarEdge ? contentContainer.y + (contentContainer.barBottom ? _dyClamp : 0) : contentContainer.y + contentContainer.height * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr) - contentContainer.verticalConnectorExtent * s
blurWidth: (shouldBeVisible && contentWrapper.publishedOpacity > 0) ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.width - Math.abs(_dxClamp)) : (contentContainer.width + contentContainer.horizontalConnectorExtent * 2) * s) : 0 blurWidth: shouldBeVisible ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.width - Math.abs(_dxClamp)) : (contentContainer.width + contentContainer.horizontalConnectorExtent * 2) * s) : 0
blurHeight: (shouldBeVisible && contentWrapper.publishedOpacity > 0) ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.height - Math.abs(_dyClamp)) : (contentContainer.height + contentContainer.verticalConnectorExtent * 2) * s) : 0 blurHeight: shouldBeVisible ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.height - Math.abs(_dyClamp)) : (contentContainer.height + contentContainer.verticalConnectorExtent * 2) * s) : 0
blurRadius: Theme.isConnectedEffect ? Theme.connectedCornerRadius : Theme.connectedSurfaceRadius blurRadius: Theme.isConnectedEffect ? Theme.connectedCornerRadius : Theme.connectedSurfaceRadius
} }
@@ -1077,7 +1089,11 @@ Item {
duration: Math.round(Theme.variantDuration(animationDuration, shouldBeVisible) * Theme.variantOpacityDurationScale) duration: Math.round(Theme.variantDuration(animationDuration, shouldBeVisible) * Theme.variantOpacityDurationScale)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
onRunningChanged: contentWrapper._animating = running onRunningChanged: {
contentWrapper._animating = running;
if (!running && !root.shouldBeVisible)
contentWrapper._renderActive = false;
}
} }
} }
@@ -1087,8 +1103,6 @@ Item {
duration: Math.round(Theme.variantDuration(animationDuration, shouldBeVisible) * Theme.variantOpacityDurationScale) duration: Math.round(Theme.variantDuration(animationDuration, shouldBeVisible) * Theme.variantOpacityDurationScale)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
onRunningChanged: if (!running && contentWrapper.publishedOpacity === 0)
contentWrapper._renderActive = false
} }
} }
@@ -1100,6 +1114,14 @@ Item {
} }
} }
Connections {
target: contentWindow
function onVisibleChanged() {
if (!contentWindow.visible)
contentWrapper._renderActive = false;
}
}
Item { Item {
anchors.fill: parent anchors.fill: parent
clip: false clip: false

View File

@@ -553,7 +553,7 @@ Item {
targetWindow: contentWindow targetWindow: contentWindow
readonly property real s: Math.min(1, contentContainer.scaleValue) readonly property real s: Math.min(1, contentContainer.scaleValue)
readonly property bool trackBlurFromBarEdge: root.fluidStandaloneActive readonly property bool trackBlurFromBarEdge: root.fluidStandaloneActive
readonly property bool blurAlive: trackBlurFromBarEdge ? (contentContainer.revealWidth > 0 && contentContainer.revealHeight > 0) : (root.shouldBeVisible && contentWrapper.publishedOpacity > 0) readonly property bool blurAlive: trackBlurFromBarEdge ? (contentContainer.revealWidth > 0 && contentContainer.revealHeight > 0) : root.shouldBeVisible
blurX: trackBlurFromBarEdge ? contentContainer.x + contentContainer.revealX : contentContainer.x + contentContainer.width * (1 - s) * 0.5 + Theme.snap(contentContainer.animX, root.dpr) blurX: trackBlurFromBarEdge ? contentContainer.x + contentContainer.revealX : contentContainer.x + contentContainer.width * (1 - s) * 0.5 + Theme.snap(contentContainer.animX, root.dpr)
blurY: trackBlurFromBarEdge ? contentContainer.y + contentContainer.revealY : contentContainer.y + contentContainer.height * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr) blurY: trackBlurFromBarEdge ? contentContainer.y + contentContainer.revealY : contentContainer.y + contentContainer.height * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr)
@@ -825,7 +825,11 @@ Item {
duration: Math.round(Theme.variantDuration(root.animationDuration, root.shouldBeVisible) * Theme.variantOpacityDurationScale) duration: Math.round(Theme.variantDuration(root.animationDuration, root.shouldBeVisible) * Theme.variantOpacityDurationScale)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
onRunningChanged: contentWrapper._animating = running onRunningChanged: {
contentWrapper._animating = running;
if (!running && !root.shouldBeVisible)
contentWrapper._renderActive = false;
}
} }
} }
@@ -835,8 +839,6 @@ Item {
duration: Math.round(Theme.variantDuration(root.animationDuration, root.shouldBeVisible) * Theme.variantOpacityDurationScale) duration: Math.round(Theme.variantDuration(root.animationDuration, root.shouldBeVisible) * Theme.variantOpacityDurationScale)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
onRunningChanged: if (!running && contentWrapper.publishedOpacity === 0)
contentWrapper._renderActive = false
} }
} }
@@ -848,6 +850,14 @@ Item {
} }
} }
Connections {
target: contentWindow
function onVisibleChanged() {
if (!contentWindow.visible)
contentWrapper._renderActive = false;
}
}
Loader { Loader {
id: contentLoader id: contentLoader
anchors.fill: parent anchors.fill: parent