diff options
Diffstat (limited to 'modules/bar/popouts/Content.qml')
| -rw-r--r-- | modules/bar/popouts/Content.qml | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/modules/bar/popouts/Content.qml b/modules/bar/popouts/Content.qml index 43a0a09..2c10e5f 100644 --- a/modules/bar/popouts/Content.qml +++ b/modules/bar/popouts/Content.qml @@ -9,15 +9,15 @@ import QtQuick Item { id: root + required property Item wrapper required property ShellScreen screen - - property string currentName - property real currentCenter - property bool hasCurrent + required property string currentName + required property real currentCenter + required property bool hasCurrent anchors.centerIn: parent - implicitWidth: hasCurrent ? (content.children.find(c => c.shouldBeActive)?.implicitWidth ?? 0) + Appearance.padding.large * 2 : 0 + implicitWidth: (content.children.find(c => c.shouldBeActive)?.implicitWidth ?? 0) + Appearance.padding.large * 2 implicitHeight: (content.children.find(c => c.shouldBeActive)?.implicitHeight ?? 0) + Appearance.padding.large * 2 Item { @@ -26,11 +26,11 @@ Item { anchors.fill: parent anchors.margins: Appearance.padding.large - clip: true - Popout { name: "activewindow" - source: "ActiveWindow.qml" + sourceComponent: ActiveWindow { + wrapper: root.wrapper + } } Popout { @@ -85,30 +85,6 @@ Item { } } - Behavior on implicitWidth { - Anim { - easing.bezierCurve: Appearance.anim.curves.emphasized - } - } - - Behavior on implicitHeight { - enabled: root.implicitWidth > 0 - - Anim { - easing.bezierCurve: Appearance.anim.curves.emphasized - } - } - - Behavior on currentCenter { - enabled: root.implicitWidth > 0 - - NumberAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.emphasized - } - } - component Popout: Loader { id: popout |