diff options
Diffstat (limited to 'raveos-calamares-theme/etc/calamares/branding/raveos/RaveOS/JelszoMezo.qml')
| -rw-r--r-- | raveos-calamares-theme/etc/calamares/branding/raveos/RaveOS/JelszoMezo.qml | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/raveos-calamares-theme/etc/calamares/branding/raveos/RaveOS/JelszoMezo.qml b/raveos-calamares-theme/etc/calamares/branding/raveos/RaveOS/JelszoMezo.qml new file mode 100644 index 0000000..2a2e57e --- /dev/null +++ b/raveos-calamares-theme/etc/calamares/branding/raveos/RaveOS/JelszoMezo.qml @@ -0,0 +1,56 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import "." + +TextField { + id: field + property bool reveal: false + property string revealName: "" + property bool highlight: false + signal revealClicked() + + implicitHeight: 44 + leftPadding: 12 + rightPadding: 44 + echoMode: reveal ? TextInput.Normal : TextInput.Password + color: Stilus.szoveg + placeholderTextColor: Stilus.szovegHalvany + font.family: Stilus.font + font.pixelSize: 14 + + background: Rectangle { + color: Stilus.felulet + border.width: 1 + border.color: field.activeFocus || field.highlight ? Stilus.zold : Stilus.keretErosebb + } + + Button { + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + width: 44 + height: 44 + padding: 0 + focusPolicy: Qt.NoFocus + Accessible.name: field.revealName + background: Item {} + contentItem: Canvas { + property bool aktiv: field.reveal + onAktivChanged: requestPaint() + onPaint: { + var c = getContext("2d") + c.reset() + c.strokeStyle = aktiv ? Stilus.zold : Stilus.szovegHalvany + c.lineWidth = 2 + c.beginPath() + c.moveTo(12, 22) + c.quadraticCurveTo(22, 12, 32, 22) + c.quadraticCurveTo(22, 32, 12, 22) + c.stroke() + c.beginPath() + c.arc(22, 22, 3, 0, 2 * Math.PI) + c.stroke() + } + } + onClicked: field.revealClicked() + } +} |