init: working version
This commit is contained in:
commit
7d8d7dacae
109 changed files with 15066 additions and 0 deletions
80
modules/session/Wrapper.qml
Normal file
80
modules/session/Wrapper.qml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.config
|
||||
import qs.custom
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property PersistentProperties uiState
|
||||
required property var panels
|
||||
readonly property real nonAnimHeight: content.implicitHeight
|
||||
|
||||
visible: height > 0
|
||||
implicitWidth: content.implicitWidth
|
||||
implicitHeight: 0
|
||||
|
||||
states: State {
|
||||
name: "visible"
|
||||
when: root.uiState.session
|
||||
|
||||
PropertyChanges {
|
||||
root.implicitHeight: root.nonAnimHeight
|
||||
}
|
||||
}
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "visible"
|
||||
|
||||
Anim {
|
||||
target: root
|
||||
property: "implicitHeight"
|
||||
easing.bezierCurve: Config.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
from: "visible"
|
||||
to: ""
|
||||
|
||||
Anim {
|
||||
target: root
|
||||
property: "implicitHeight"
|
||||
easing.bezierCurve: Config.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Binding {
|
||||
target: root.uiState
|
||||
property: "blockScreen"
|
||||
value: true
|
||||
when: root.uiState.session
|
||||
}
|
||||
|
||||
Background {
|
||||
id: background
|
||||
visible: false
|
||||
wrapper: root
|
||||
}
|
||||
|
||||
GlowEffect {
|
||||
source: background
|
||||
glowColor: Config.colors.power
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: content
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Component.onCompleted: active = Qt.binding(() => root.uiState.session || root.visible)
|
||||
|
||||
sourceComponent: Content {
|
||||
uiState: root.uiState
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue