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
+4 -1
View File
@@ -23,7 +23,8 @@ Column {
Label {
id: timeLabel
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: root.font.pointSize * 3
font.pointSize: root.font.pointSize * 9
font.bold: true
color: root.palette.text
renderType: Text.QtRendering
function updateTime() {
@@ -35,6 +36,8 @@ Column {
id: dateLabel
anchors.horizontalCenter: parent.horizontalCenter
color: root.palette.text
font.pointSize: root.font.pointSize * 2
font.bold: true
renderType: Text.QtRendering
function updateTime() {
text = new Date().toLocaleDateString(Qt.locale(config.Locale), config.DateFormat == "short" ? Locale.ShortFormat : config.DateFormat !== "" ? config.DateFormat : Locale.LongFormat)
+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
}
+1 -2
View File
@@ -13,7 +13,6 @@ Item {
height: root.font.pointSize
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
property var selectedSession: selectSession.currentIndex
property string textConstantSession
property int loginButtonWidth
@@ -68,7 +67,7 @@ Item {
contentItem: Text {
id: displayedItem
text: (config.TranslateSession || (textConstantSession + ":")) + " " + selectSession.currentText
text: selectSession.currentText
color: root.palette.text
verticalAlignment: Text.AlignVCenter
anchors.left: parent.left
+7
View File
@@ -31,6 +31,7 @@ RowLayout {
icon.source: modelData ? Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg") : ""
icon.height: 2 * Math.round((root.font.pointSize * 3) / 2)
icon.width: 2 * Math.round((root.font.pointSize * 3) / 2)
icon.color: config.IconColor
display: AbstractButton.TextUnderIcon
visible: config.ForceHideSystemButtons != "true" && modelData[2]
hoverEnabled: true
@@ -57,10 +58,12 @@ RowLayout {
when: parent.children[index].down
PropertyChanges {
target: parent.children[index]
icon.color: root.palette.highlight
palette.buttonText: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: parent.children[index].background
icon.color: root.palette.highlight
border.color: Qt.darker(root.palette.highlight, 1.1)
}
},
@@ -69,10 +72,12 @@ RowLayout {
when: parent.children[index].hovered
PropertyChanges {
target: parent.children[index]
icon.color: root.palette.highlight
palette.buttonText: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: parent.children[index].background
icon.color: root.palette.highlight
border.color: Qt.lighter(root.palette.highlight, 1.1)
}
},
@@ -81,10 +86,12 @@ RowLayout {
when: parent.children[index].activeFocus
PropertyChanges {
target: parent.children[index]
icon.color: root.palette.highlight
palette.buttonText: root.palette.highlight
}
PropertyChanges {
target: parent.children[index].background
icon.color: root.palette.highlight
border.color: root.palette.highlight
}
}