lock: fix media position
This commit is contained in:
parent
7223622933
commit
173738c0be
2 changed files with 41 additions and 38 deletions
|
|
@ -6,8 +6,6 @@ import QtQuick.Layouts
|
|||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
required property bool locked
|
||||
|
||||
spacing: 0
|
||||
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -90,8 +90,6 @@ WlSessionLockSurface {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.top
|
||||
anchors.bottomMargin: -backgrounds.clockBottom
|
||||
|
||||
locked: root.locked
|
||||
}
|
||||
|
||||
Input {
|
||||
|
|
@ -112,48 +110,55 @@ WlSessionLockSurface {
|
|||
}
|
||||
|
||||
Loader {
|
||||
id: media
|
||||
|
||||
active: root.screen.width > Config.lock.sizes.smallScreenWidth
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: MediaPlaying {
|
||||
id: media
|
||||
state: root.screen.width > Config.lock.sizes.largeScreenWidth ? "tl" : "br"
|
||||
states: [
|
||||
State {
|
||||
name: "tl"
|
||||
|
||||
isLarge: root.screen.width > Config.lock.sizes.largeScreenWidth
|
||||
|
||||
state: isLarge ? "tl" : "br"
|
||||
states: [
|
||||
State {
|
||||
name: "tl"
|
||||
|
||||
AnchorChanges {
|
||||
target: media
|
||||
anchors.bottom: media.parent.top
|
||||
anchors.right: media.parent.left
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
media.anchors.bottomMargin: -backgrounds.mediaY
|
||||
media.anchors.rightMargin: -backgrounds.mediaX
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "br"
|
||||
|
||||
AnchorChanges {
|
||||
target: media
|
||||
anchors.top: media.parent.bottom
|
||||
anchors.left: media.parent.right
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
media.anchors.topMargin: -backgrounds.mediaY
|
||||
media.anchors.leftMargin: -backgrounds.mediaX
|
||||
}
|
||||
AnchorChanges {
|
||||
target: media
|
||||
anchors.bottom: media.parent.top
|
||||
anchors.right: media.parent.left
|
||||
}
|
||||
]
|
||||
|
||||
PropertyChanges {
|
||||
media.anchors.bottomMargin: -backgrounds.mediaY
|
||||
media.anchors.rightMargin: -backgrounds.mediaX
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "br"
|
||||
|
||||
AnchorChanges {
|
||||
target: media
|
||||
anchors.top: media.parent.bottom
|
||||
anchors.left: media.parent.right
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
media.anchors.topMargin: -backgrounds.mediaY
|
||||
media.anchors.leftMargin: -backgrounds.mediaX
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
sourceComponent: MediaPlaying {
|
||||
isLarge: root.screen.width > Config.lock.sizes.largeScreenWidth
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: root.screen.width > Config.lock.sizes.largeScreenWidth
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: Buttons {}
|
||||
}
|
||||
|
||||
component Anim: NumberAnimation {
|
||||
duration: Appearance.anim.durations.large
|
||||
easing.type: Easing.BezierSpline
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue