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