mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
The current lockscreen mockups were originally from this mockup: https://phabricator.kde.org/T12717 There are some issues with it however: - The 0 key is on the right, which is a bit strange and differs from the layouts of all other platforms - One-handed usability is worse due to 4 columns instead of 3 - Most mobile lockscreen have the keypad toward the center for one-handed usability, our keypad is stuck to the bottom - It makes use of a lot of shadows which makes it slower to load - It's supposed to emulate the design of the keyboard, but it doesn't look like it so it's out of place The new design is much simpler, with a centered 3 column approach making keys much easier to reach with one hand. It also avoids the use of shadows and layers.    TODO: - Investigate some improvements for keyboard input
51 lines
1.3 KiB
QML
51 lines
1.3 KiB
QML
// SPDX-FileCopyrightText: 2023-2024 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
|
|
Loader {
|
|
id: root
|
|
asynchronous: true
|
|
|
|
property var lockScreenState
|
|
|
|
sourceComponent: {
|
|
if (lockScreenState.isFingerprintSupported) {
|
|
return fingerprintIcon;
|
|
} else {
|
|
return scrollUpIcon;
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: scrollUpIcon
|
|
|
|
Kirigami.Icon {
|
|
implicitWidth: Kirigami.Units.iconSizes.small
|
|
implicitHeight: Kirigami.Units.iconSizes.small
|
|
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
|
source: "arrow-up"
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: fingerprintIcon
|
|
|
|
Kirigami.Icon {
|
|
source: 'fingerprint-symbolic'
|
|
implicitWidth: Kirigami.Units.iconSizes.medium
|
|
implicitHeight: Kirigami.Units.iconSizes.medium
|
|
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.bottom: parent.bottom
|
|
anchors.bottomMargin: Kirigami.Units.gridUnit * 2 + flickable.position * 0.5
|
|
}
|
|
}
|
|
}
|