File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,14 +83,30 @@ WindowDialog {
8383 onTextChanged: root .fSsid = text
8484 }
8585
86- // Password
87- MaterialTextField {
88- id: passwordField
86+ // Password (masked by default; the eye toggles reveal)
87+ RowLayout {
8988 Layout .fillWidth : true
90- placeholderText: Translation .tr (" Password (8+ characters)" )
91- text: root .fPassword
92- onTextChanged: root .fPassword = text
93- inputMethodHints: Qt .ImhSensitiveData
89+ spacing: 4
90+ MaterialTextField {
91+ id: passwordField
92+ Layout .fillWidth : true
93+ property bool revealed: false
94+ placeholderText: Translation .tr (" Password (8+ characters)" )
95+ text: root .fPassword
96+ onTextChanged: root .fPassword = text
97+ echoMode: revealed ? TextInput .Normal : TextInput .Password
98+ inputMethodHints: Qt .ImhSensitiveData
99+ }
100+ IconToolbarButton {
101+ Layout .preferredHeight : passwordField .implicitHeight
102+ Layout .preferredWidth : Layout .preferredHeight
103+ text: passwordField .revealed ? " visibility_off" : " visibility"
104+ toggled: passwordField .revealed
105+ onClicked: passwordField .revealed = ! passwordField .revealed
106+ StyledToolTip {
107+ text: passwordField .revealed ? Translation .tr (" Hide password" ) : Translation .tr (" Show password" )
108+ }
109+ }
94110 }
95111 StyledText {
96112 visible: ! root .passwordValid
You can’t perform that action at this time.
0 commit comments