summaryrefslogtreecommitdiff
path: root/raveos-calamares-module/raveusers/ui/PasswordField.qml
diff options
context:
space:
mode:
Diffstat (limited to 'raveos-calamares-module/raveusers/ui/PasswordField.qml')
-rw-r--r--raveos-calamares-module/raveusers/ui/PasswordField.qml41
1 files changed, 41 insertions, 0 deletions
diff --git a/raveos-calamares-module/raveusers/ui/PasswordField.qml b/raveos-calamares-module/raveusers/ui/PasswordField.qml
new file mode 100644
index 0000000..0dffb49
--- /dev/null
+++ b/raveos-calamares-module/raveusers/ui/PasswordField.qml
@@ -0,0 +1,41 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+TextField {
+ id: field
+ property bool reveal: false
+ signal revealClicked()
+
+ implicitHeight: 52
+ leftPadding: 14
+ rightPadding: 46
+ echoMode: reveal ? TextInput.Normal : TextInput.Password
+ color: "#ffffff"
+ placeholderTextColor: "#5b6270"
+ font.pixelSize: 15
+
+ background: Rectangle {
+ radius: 7
+ color: "#303030"
+ border.color: field.activeFocus ? "#3d7839" : "#303030"
+ border.width: field.activeFocus ? 1.5 : 1
+ }
+
+ Text {
+ text: "\uD83D\uDC41"
+ font.pixelSize: 16
+ color: field.reveal ? "#3d7839" : "#9ca3af"
+ anchors.right: parent.right
+ anchors.rightMargin: 14
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ MouseArea {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ width: 40
+ height: 40
+ cursorShape: Qt.PointingHandCursor
+ onClicked: field.revealClicked()
+ }
+}