LockScreen: converted to Layout

This commit is contained in:
LemmyCook 2025-09-05 18:15:28 -04:00
parent 9a14a5cc10
commit 4768485974
2 changed files with 357 additions and 361 deletions

View file

@ -155,7 +155,7 @@ Loader {
anchors.topMargin: 80 * scaling
spacing: 40 * scaling
Column {
ColumnLayout {
spacing: Style.marginXS * scaling
Layout.alignment: Qt.AlignHCenter
@ -168,6 +168,7 @@ Loader {
font.letterSpacing: -2 * scaling
color: Color.mOnSurface
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignHCenter
SequentialAnimation on scale {
loops: Animation.Infinite
@ -192,22 +193,23 @@ Loader {
font.weight: Font.Light
color: Color.mOnSurface
horizontalAlignment: Text.AlignHCenter
width: timeText.width
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: timeText.implicitWidth
}
}
Column {
ColumnLayout {
spacing: Style.marginM * scaling
Layout.alignment: Qt.AlignHCenter
Rectangle {
width: 108 * scaling
height: 108 * scaling
Layout.preferredWidth: 108 * scaling
Layout.preferredHeight: 108 * scaling
Layout.alignment: Qt.AlignHCenter
radius: width * 0.5
color: Color.transparent
border.color: Color.mPrimary
border.width: Math.max(1, Style.borderL * scaling)
anchors.horizontalCenter: parent.horizontalCenter
z: 10
Loader {
@ -375,11 +377,6 @@ Loader {
anchors.centerIn: parent
anchors.verticalCenterOffset: 50 * scaling
Item {
width: parent.width
height: 280 * scaling
Layout.fillWidth: true
Rectangle {
id: terminalBackground
anchors.fill: parent
@ -434,7 +431,7 @@ Loader {
Layout.fillWidth: true
}
Row {
RowLayout {
spacing: Style.marginS * scaling
visible: batteryIndicator.batteryVisible
NIcon {
@ -451,7 +448,7 @@ Loader {
}
}
Row {
RowLayout {
spacing: Style.marginS * scaling
NText {
text: keyboardLayout.currentLayout
@ -644,12 +641,12 @@ Loader {
}
}
Row {
RowLayout {
Layout.alignment: Qt.AlignRight
Layout.bottomMargin: -10 * scaling
Rectangle {
width: 120 * scaling
height: 40 * scaling
Layout.preferredWidth: 120 * scaling
Layout.preferredHeight: 40 * scaling
radius: Style.radiusS * scaling
color: executeButtonArea.containsMouse ? Color.mPrimary : Qt.alpha(Color.mPrimary, 0.2)
border.color: Color.mPrimary
@ -734,18 +731,17 @@ Loader {
}
}
}
}
// Power buttons at bottom
Row {
// Power buttons at bottom right
RowLayout {
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: 50 * scaling
spacing: 20 * scaling
Rectangle {
width: 60 * scaling
height: 60 * scaling
Layout.preferredWidth: 60 * scaling
Layout.preferredHeight: 60 * scaling
radius: width * 0.5
color: powerButtonArea.containsMouse ? Color.mError : Qt.alpha(Color.mError, 0.2)
border.color: Color.mError
@ -769,8 +765,8 @@ Loader {
}
Rectangle {
width: 60 * scaling
height: 60 * scaling
Layout.preferredWidth: 60 * scaling
Layout.preferredHeight: 60 * scaling
radius: width * 0.5
color: restartButtonArea.containsMouse ? Color.mPrimary : Qt.alpha(Color.mPrimary, Style.opacityLight)
border.color: Color.mPrimary
@ -794,8 +790,8 @@ Loader {
}
Rectangle {
width: 60 * scaling
height: 60 * scaling
Layout.preferredWidth: 60 * scaling
Layout.preferredHeight: 60 * scaling
radius: width * 0.5
color: suspendButtonArea.containsMouse ? Color.mSecondary : Qt.alpha(Color.mSecondary, 0.2)
border.color: Color.mSecondary