feat: fade in/out drawers

This commit is contained in:
2 * r + 2 * t 2026-03-27 20:54:52 +11:00
parent ff57473781
commit 0f5d2ddc16
6 changed files with 7 additions and 0 deletions

View file

@ -36,6 +36,7 @@ Item {
anchors.topMargin: (-implicitHeight - 5) * offsetScale anchors.topMargin: (-implicitHeight - 5) * offsetScale
implicitHeight: content.implicitHeight implicitHeight: content.implicitHeight
implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open
opacity: 1 - offsetScale
Behavior on offsetScale { Behavior on offsetScale {
Anim { Anim {

View file

@ -35,6 +35,7 @@ Item {
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
implicitHeight: content.implicitHeight implicitHeight: content.implicitHeight
implicitWidth: content.implicitWidth || 630 // Hard coded fallback for first open implicitWidth: content.implicitWidth || 630 // Hard coded fallback for first open
opacity: 1 - offsetScale
Component.onCompleted: Qt.callLater(() => Apps) // Load apps on init Component.onCompleted: Qt.callLater(() => Apps) // Load apps on init

View file

@ -41,6 +41,7 @@ Item {
anchors.rightMargin: (-implicitWidth - 5) * offsetScale anchors.rightMargin: (-implicitWidth - 5) * offsetScale
implicitWidth: content.implicitWidth implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight implicitHeight: content.implicitHeight
opacity: 1 - offsetScale
Behavior on offsetScale { Behavior on offsetScale {
Anim { Anim {
@ -98,6 +99,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
asynchronous: true
active: root.shouldBeActive || root.visible active: root.shouldBeActive || root.visible
sourceComponent: Content { sourceComponent: Content {

View file

@ -18,6 +18,7 @@ Item {
anchors.rightMargin: (-implicitWidth - 5) * offsetScale anchors.rightMargin: (-implicitWidth - 5) * offsetScale
implicitWidth: content.implicitWidth implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight || 510 // Hard coded fallback for first open implicitHeight: content.implicitHeight || 510 // Hard coded fallback for first open
opacity: 1 - offsetScale
Behavior on offsetScale { Behavior on offsetScale {
Anim { Anim {

View file

@ -16,6 +16,7 @@ Item {
visible: offsetScale < 1 visible: offsetScale < 1
anchors.rightMargin: (-implicitWidth - 5) * offsetScale anchors.rightMargin: (-implicitWidth - 5) * offsetScale
implicitWidth: Config.sidebar.sizes.width implicitWidth: Config.sidebar.sizes.width
opacity: 1 - offsetScale
Behavior on offsetScale { Behavior on offsetScale {
Anim { Anim {

View file

@ -27,6 +27,7 @@ Item {
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
implicitHeight: content.implicitHeight + content.anchors.margins * 2 implicitHeight: content.implicitHeight + content.anchors.margins * 2
implicitWidth: sidebar.visible ? sidebar.width : Config.utilities.sizes.width implicitWidth: sidebar.visible ? sidebar.width : Config.utilities.sizes.width
opacity: 1 - offsetScale
Behavior on offsetScale { Behavior on offsetScale {
Anim { Anim {