mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
lockscreen: Fix styling
This commit is contained in:
parent
da142b608c
commit
92b5dc1dbd
3 changed files with 45 additions and 16 deletions
|
|
@ -177,12 +177,16 @@ Rectangle {
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
visible: modelData === "R"
|
visible: modelData === "R"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
width: Kirigami.Units.iconSizes.small
|
||||||
|
height: Kirigami.Units.iconSizes.small
|
||||||
source: "edit-clear"
|
source: "edit-clear"
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
visible: modelData === "E"
|
visible: modelData === "E"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
width: Kirigami.Units.iconSizes.small
|
||||||
|
height: Kirigami.Units.iconSizes.small
|
||||||
source: "go-next"
|
source: "go-next"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,6 @@ Item {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
|
||||||
Kirigami.Theme.inherit: false
|
|
||||||
|
|
||||||
// header bar and action drawer
|
// header bar and action drawer
|
||||||
Loader {
|
Loader {
|
||||||
|
|
@ -124,7 +122,7 @@ Item {
|
||||||
onPasswordRequested: flickable.goToOpenPosition()
|
onPasswordRequested: flickable.goToOpenPosition()
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: scrollUpIconLoader.top
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
|
@ -147,7 +145,7 @@ Item {
|
||||||
|
|
||||||
anchors.topMargin: headerBarLoader.statusBarHeight
|
anchors.topMargin: headerBarLoader.statusBarHeight
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: scrollUpIconLoader.top
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
|
@ -160,17 +158,40 @@ Item {
|
||||||
id: scrollUpIconLoader
|
id: scrollUpIconLoader
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
|
property real animationY: 0
|
||||||
|
readonly property real fullYOffset: Kirigami.Units.largeSpacing
|
||||||
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: Kirigami.Units.gridUnit + flickable.position * 0.5
|
anchors.bottomMargin: Kirigami.Units.gridUnit + flickable.position * 0.5 + scrollUpIconLoader.animationY
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
// animate it going up and down
|
||||||
|
NumberAnimation on animationY {
|
||||||
|
id: animateUpAndDown
|
||||||
|
running: true
|
||||||
|
duration: 800
|
||||||
|
easing.type: Easing.InCubic
|
||||||
|
to: scrollUpIconLoader.fullYOffset
|
||||||
|
|
||||||
|
onFinished: {
|
||||||
|
if (scrollUpIconLoader.animationY === scrollUpIconLoader.fullYOffset) {
|
||||||
|
to = 0;
|
||||||
|
easing.type = Easing.OutCubic;
|
||||||
|
} else {
|
||||||
|
to = scrollUpIconLoader.fullYOffset;
|
||||||
|
easing.type = Easing.InCubic;
|
||||||
|
}
|
||||||
|
restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceComponent: Kirigami.Icon {
|
sourceComponent: Kirigami.Icon {
|
||||||
id: scrollUpIcon
|
id: scrollUpIcon
|
||||||
implicitWidth: Kirigami.Units.iconSizes.smallMedium
|
implicitWidth: Kirigami.Units.iconSizes.small
|
||||||
implicitHeight: Kirigami.Units.iconSizes.smallMedium
|
implicitHeight: Kirigami.Units.iconSizes.small
|
||||||
opacity: 1 - flickable.openFactor
|
opacity: 1 - flickable.openFactor
|
||||||
|
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.ComplementaryColorGroup
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
||||||
source: "arrow-up"
|
source: "arrow-up"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -213,9 +234,9 @@ Item {
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.bottomMargin: Kirigami.Units.gridUnit
|
Layout.bottomMargin: Kirigami.Units.gridUnit
|
||||||
implicitWidth: Kirigami.Units.iconSizes.smallMedium
|
implicitWidth: Kirigami.Units.iconSizes.small
|
||||||
implicitHeight: Kirigami.Units.iconSizes.smallMedium
|
implicitHeight: Kirigami.Units.iconSizes.small
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.ComplementaryColorGroup
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
||||||
source: "arrow-down"
|
source: "arrow-down"
|
||||||
opacity: Math.sin((Math.PI / 2) * flickable.openFactor + 1.5 * Math.PI) + 1
|
opacity: Math.sin((Math.PI / 2) * flickable.openFactor + 1.5 * Math.PI) + 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -210,12 +210,16 @@ Rectangle {
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: dotDisplay
|
id: dotDisplay
|
||||||
property int dotWidth: Math.round(Kirigami.Units.gridUnit * 0.35)
|
|
||||||
|
property int dotWidth: 6
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
Layout.bottomMargin: Math.round(dotWidth / 2)
|
Layout.bottomMargin: Math.round(dotWidth / 2)
|
||||||
orientation: ListView.Horizontal
|
|
||||||
|
implicitHeight: dotWidth
|
||||||
implicitWidth: count * dotWidth + spacing * (count - 1)
|
implicitWidth: count * dotWidth + spacing * (count - 1)
|
||||||
|
|
||||||
|
orientation: ListView.Horizontal
|
||||||
spacing: 8
|
spacing: 8
|
||||||
model: dotDisplayModel
|
model: dotDisplayModel
|
||||||
|
|
||||||
|
|
@ -224,8 +228,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
implicitWidth: dotDisplay.dotWidth
|
width: dotDisplay.dotWidth
|
||||||
implicitHeight: dotDisplay.dotWidth
|
height: dotDisplay.dotWidth
|
||||||
property bool showChar: index === root.previewCharIndex
|
property bool showChar: index === root.previewCharIndex
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue