Major update: Changed: layout, fonts, configs, readme.

This commit is contained in:
Keyitdev
2024-04-06 00:04:34 +02:00
parent 4a38840903
commit 1ede3c2f68
38 changed files with 128 additions and 153 deletions
+80 -143
View File
@@ -168,11 +168,13 @@ Column {
TextField {
id: username
text: config.ForceLastUser == "true" ? selectUser.currentText : null
font.bold: true
font.capitalization: config.AllowBadUsernames == "false" ? Font.Capitalize : Font.MixedCase
anchors.centerIn: parent
height: root.font.pointSize * 3
width: parent.width
placeholderText: config.TranslatePlaceholderUsername || textConstants.userName
placeholderTextColor: config.placeholderColor
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
renderType: Text.QtRendering
@@ -181,8 +183,9 @@ Column {
selectAll()
}
background: Rectangle {
color: "transparent"
border.color: root.palette.text
color: "#222222"
opacity: 0.2
border.color: "transparent"
border.width: parent.activeFocus ? 2 : 1
radius: config.RoundCorners || 0
}
@@ -205,31 +208,101 @@ Column {
}
]
}
}
Item {
id: passwordField
height: root.font.pointSize * 4.5
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
Button {
id: secretCheckBox
width: parent.height
height: parent.height
anchors.left: parent.left
z: 2
background: Rectangle {
color: "transparent"
border.color: "transparent"
}
CheckBox {
id: revealSecret
width: parent.width
height: parent.height
hoverEnabled: true
indicator: Button {
id: passwordIcon
width: selectUser.height * 1
height: parent.height
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: selectUser.height * 0
icon.height: parent.height * 0.25
icon.width: parent.height * 0.25
enabled: false
icon.color: root.palette.text
icon.source: Qt.resolvedUrl("../Assets/Password.svg")
background: Rectangle {
color: "transparent"
border.color: "transparent"
}
}
states: [
State {
name: "unchecked"
when: revealSecret.checked
PropertyChanges {
target: passwordIcon
icon.source: Qt.resolvedUrl("../Assets/Password.svg")
}
},
State {
name: "checked"
when: revealSecret.enabled
PropertyChanges {
target: passwordIcon
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
}
}
]
Keys.onReturnPressed: toggle()
Keys.onEnterPressed: toggle()
KeyNavigation.down: loginButton
}
}
TextField {
id: password
anchors.centerIn: parent
height: root.font.pointSize * 3
width: parent.width
font.bold: true
focus: config.ForcePasswordFocus == "true" ? true : false
selectByMouse: true
echoMode: revealSecret.checked ? TextInput.Normal : TextInput.Password
placeholderText: config.TranslatePlaceholderPassword || textConstants.password
placeholderTextColor: config.placeholderColor
horizontalAlignment: TextInput.AlignHCenter
passwordCharacter: "•"
passwordMaskDelay: config.ForceHideCompletePassword == "true" ? undefined : 1000
renderType: Text.QtRendering
background: Rectangle {
color: "transparent"
border.color: root.palette.text
color: "#222222"
opacity: 0.2
border.color: "transparent"
border.width: parent.activeFocus ? 2 : 1
radius: config.RoundCorners || 0
}
@@ -259,142 +332,7 @@ Column {
duration: 150
}
}
]
}
Item {
id: secretCheckBox
height: root.font.pointSize * 7
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
CheckBox {
id: revealSecret
width: parent.width
hoverEnabled: true
indicator: Rectangle {
id: indicator
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 3
anchors.leftMargin: 4
implicitHeight: root.font.pointSize
implicitWidth: root.font.pointSize
color: "transparent"
border.color: root.palette.text
border.width: parent.activeFocus ? 2 : 1
Rectangle {
id: dot
anchors.centerIn: parent
implicitHeight: parent.width - 6
implicitWidth: parent.width - 6
color: root.palette.text
opacity: revealSecret.checked ? 1 : 0
}
}
contentItem: Text {
id: indicatorLabel
text: config.TranslateShowPassword || "Show Password"
anchors.verticalCenter: indicator.verticalCenter
horizontalAlignment: Text.AlignLeft
anchors.left: indicator.right
anchors.leftMargin: indicator.width / 2
font.pointSize: root.font.pointSize * 0.8
font.family: root.font.family
color: root.palette.text
}
Keys.onReturnPressed: toggle()
Keys.onEnterPressed: toggle()
KeyNavigation.down: loginButton
background: Rectangle {
color: "transparent"
border.width: parent.activeFocus ? 1 : 0
border.color: parent.activeFocus ? root.palette.text : "transparent"
height: parent.activeFocus ? 2 : 0
width: (indicator.width + indicatorLabel.contentWidth + indicatorLabel.anchors.leftMargin + 2)
anchors.top: indicatorLabel.bottom
anchors.left: parent.left
anchors.leftMargin: 3
anchors.topMargin: 8
}
}
states: [
State {
name: "pressed"
when: revealSecret.down
PropertyChanges {
target: revealSecret.contentItem
color: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: dot
color: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: indicator
border.color: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: revealSecret.background
border.color: Qt.darker(root.palette.highlight, 1.1)
}
},
State {
name: "hovered"
when: revealSecret.hovered
PropertyChanges {
target: indicatorLabel
color: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: indicator
border.color: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: dot
color: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: revealSecret.background
border.color: Qt.lighter(root.palette.highlight, 1.1)
}
},
State {
name: "focused"
when: revealSecret.activeFocus
PropertyChanges {
target: indicatorLabel
color: root.palette.highlight
}
PropertyChanges {
target: indicator
border.color: root.palette.highlight
}
PropertyChanges {
target: dot
color: root.palette.highlight
}
PropertyChanges {
target: revealSecret.background
border.color: root.palette.highlight
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "color, border.color, opacity"
duration: 150
}
}
]
]
}
Item {
@@ -543,7 +481,6 @@ Column {
SessionButton {
id: sessionSelect
textConstantSession: textConstants.session
loginButtonWidth: loginButton.background.width
}