Updates, fix bar, add walker
This commit is contained in:
parent
3b587f3e15
commit
2bfdda55d4
12 changed files with 284 additions and 161 deletions
|
@ -7,6 +7,8 @@ Item {
|
|||
required property real expandedHeight;
|
||||
required default property Item widget;
|
||||
|
||||
required property var barWindow;
|
||||
|
||||
property bool expanded: false;
|
||||
|
||||
onExpandedChanged: {
|
||||
|
@ -23,20 +25,22 @@ Item {
|
|||
}
|
||||
|
||||
readonly property rect collapsedLayerRect: {
|
||||
//console.log(`schrodinger's coordinate space: ${popupSurface.width} ${popupSurface.height}`);
|
||||
const w = popupSurface.width;
|
||||
const h = popupSurface.height;
|
||||
void [barWindow.windowTransform, popupSurface.windowTransform];
|
||||
return this.mapToItem(popupSurface.contentItem, 0, 0, width, height);
|
||||
|
||||
}
|
||||
|
||||
readonly property rect expandedLayerRect: popupSurface.expandedPosition(this)
|
||||
|
||||
readonly property rect layerRect: {
|
||||
const [p, xCurve, yCurve] = [animationProgress, ShellGlobals.popoutXCurve, ShellGlobals.popoutYCurve];
|
||||
|
||||
return Qt.rect(
|
||||
ShellGlobals.popoutXCurve.interpolate(animationProgress, collapsedLayerRect.x, expandedLayerRect.x),
|
||||
ShellGlobals.popoutYCurve.interpolate(animationProgress, collapsedLayerRect.y, expandedLayerRect.y),
|
||||
ShellGlobals.popoutXCurve.interpolate(animationProgress, collapsedLayerRect.width, expandedLayerRect.width),
|
||||
ShellGlobals.popoutYCurve.interpolate(animationProgress, collapsedLayerRect.height, expandedLayerRect.height),
|
||||
xCurve.interpolate(p, collapsedLayerRect.x, expandedLayerRect.x),
|
||||
yCurve.interpolate(p, collapsedLayerRect.y, expandedLayerRect.y),
|
||||
xCurve.interpolate(p, collapsedLayerRect.width, expandedLayerRect.width),
|
||||
yCurve.interpolate(p, collapsedLayerRect.height, expandedLayerRect.height),
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -50,6 +54,7 @@ Item {
|
|||
widget.width = Qt.binding(() => layerRect.width);
|
||||
widget.height = Qt.binding(() => layerRect.height);
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
popupSurface.disconnectOverlay(this)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue