Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements for the connect dialog and the settings screen #18

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/qml/ConnectionView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,22 @@ Item {
//text: "opc.tcp://192.168.178.25:43344"
//text: "opc.tcp://localhost:43344"
//text: "opc.tcp://10.0.2.2:43344"
placeholderText: "opc.tcp://localhost:4080"
placeholderText: "localhost:4840"
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
prefixText: "opc.tcp://"
validator: RegularExpressionValidator {
regularExpression: /[^\/].*/
}
}

StyledButton {
Layout.fillWidth: true
text: qsTranslate("Connection", "Discover")
enabled: hostUrl.acceptableInput
highlighted: enabled

onClicked: {
view.selectedHostUrl = hostUrl.text
view.selectedHostUrl = hostUrl.prefixText + hostUrl.text
BackEnd.findServers(view.selectedHostUrl)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/qml/SettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Rectangle {
pointSize: 14
bold: true
}
text: qsTranslate("Dashboard", "Saved Variable Dashboards")
text: qsTranslate("Dashboard", "Saved variable dashboards")
}

Rectangle {
Expand Down
29 changes: 20 additions & 9 deletions src/qml/controls/StyledTextField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ ColumnLayout {
property alias echoMode: textField.echoMode
property alias inputMethodHints: textField.inputMethodHints
property ThemeTextField theme: Style.textField
property alias validator: textField.validator
property alias acceptableInput: textField.acceptableInput
property alias prefixText: prefixTextField.text

Text {
id: caption
Expand All @@ -34,18 +37,26 @@ ColumnLayout {
font.bold: true
}

TextField {
id: textField
RowLayout {
Text {
id: prefixTextField
visible: text && text !== ""
color: layout.theme.captionTextColor
}

Layout.fillWidth: true
Layout.preferredHeight: layout.textFieldColumnHeight
verticalAlignment: Qt.AlignVCenter
TextField {
id: textField

Layout.fillWidth: true
Layout.preferredHeight: layout.textFieldColumnHeight
verticalAlignment: Qt.AlignVCenter

passwordCharacter: "*"
passwordMaskDelay: 500
passwordCharacter: "*"
passwordMaskDelay: 500

background: Rectangle {
color: layout.theme.background
background: Rectangle {
color: layout.theme.background
}
}
}
}
Loading