The panels are ignored if they are closed, so they don't produce bulges. This does remove the sink effect on overshoot, but that didn't work anyways. (also that change was part of the previous commit)
41 lines
1.1 KiB
QML
41 lines
1.1 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import qs.components
|
|
import qs.config
|
|
|
|
Item {
|
|
id: root
|
|
|
|
required property DrawerVisibilities visibilities
|
|
required property bool sidebarVisible
|
|
readonly property real nonAnimWidth: content.implicitWidth
|
|
|
|
readonly property bool shouldBeActive: visibilities.session && Config.session.enabled
|
|
property real offsetScale: shouldBeActive ? 0 : 1
|
|
|
|
visible: offsetScale < 1
|
|
anchors.rightMargin: (-implicitWidth - 5) * offsetScale
|
|
implicitWidth: content.implicitWidth
|
|
implicitHeight: content.implicitHeight || 510 // Hard coded fallback for first open
|
|
|
|
Behavior on offsetScale {
|
|
Anim {
|
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
|
}
|
|
}
|
|
|
|
Loader {
|
|
id: content
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.left: parent.left
|
|
|
|
active: root.shouldBeActive || root.visible
|
|
|
|
sourceComponent: Content {
|
|
visibilities: root.visibilities
|
|
}
|
|
}
|
|
}
|