File tree Expand file tree Collapse file tree 3 files changed +15
-24
lines changed
com.github.varlesh.materia-dark/contents/lockscreen
com.github.varlesh.materia-light/contents/lockscreen
com.github.varlesh.materia/contents/lockscreen Expand file tree Collapse file tree 3 files changed +15
-24
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,10 @@ PlasmaCore.ColorScope {
6464 function onPrompt (msg ) {
6565 root .notification = msg;
6666 mainBlock .echoMode = TextInput .Normal
67- mainBlock .mainPasswordBox .text = " " ;
6867 mainBlock .mainPasswordBox .forceActiveFocus ();
6968 }
7069 function onPromptForSecret (msg ) {
7170 mainBlock .echoMode = TextInput .Password
72- mainBlock .mainPasswordBox .text = " " ;
7371 mainBlock .mainPasswordBox .forceActiveFocus ();
7472 }
7573 }
@@ -141,12 +139,8 @@ PlasmaCore.ColorScope {
141139 if (blockUI) {
142140 fadeoutTimer .running = false ;
143141 } else if (uiVisible) {
144- mainBlock .mainPasswordBox .forceActiveFocus ();
145142 fadeoutTimer .restart ();
146143 }
147- if (! uiVisible) {
148- lockScreenRoot .forceActiveFocus ();
149- }
150144 if (! calledUnlock) {
151145 calledUnlock = true
152146 authenticator .tryUnlock ();
@@ -163,7 +157,7 @@ PlasmaCore.ColorScope {
163157 Keys .onEscapePressed : {
164158 uiVisible = ! uiVisible;
165159 if (! uiVisible) {
166- mainBlock . mainPasswordBox . text = " " ;
160+ root . clearPassword () ;
167161 }
168162 }
169163 Keys .onPressed : {
@@ -188,7 +182,10 @@ PlasmaCore.ColorScope {
188182 Timer {
189183 id: graceLockTimer
190184 interval: 3000
191- onTriggered: authenticator .tryUnlock ();
185+ onTriggered: {
186+ root .clearPassword ();
187+ authenticator .tryUnlock ();
188+ }
192189 }
193190
194191 Component .onCompleted : PropertyAnimation { id: launchAnimation; target: lockScreenRoot; property: " opacity" ; from: 0 ; to: 1 ; duration: 1000 }
Original file line number Diff line number Diff line change @@ -64,12 +64,10 @@ PlasmaCore.ColorScope {
6464 function onPrompt (msg ) {
6565 root .notification = msg;
6666 mainBlock .echoMode = TextInput .Normal
67- mainBlock .mainPasswordBox .text = " " ;
6867 mainBlock .mainPasswordBox .forceActiveFocus ();
6968 }
7069 function onPromptForSecret (msg ) {
7170 mainBlock .echoMode = TextInput .Password
72- mainBlock .mainPasswordBox .text = " " ;
7371 mainBlock .mainPasswordBox .forceActiveFocus ();
7472 }
7573 }
@@ -141,11 +139,7 @@ PlasmaCore.ColorScope {
141139 if (blockUI) {
142140 fadeoutTimer .running = false ;
143141 } else if (uiVisible) {
144- mainBlock .mainPasswordBox .forceActiveFocus ();
145142 fadeoutTimer .restart ();
146- if (! uiVisible) {
147- lockScreenRoot .forceActiveFocus ();
148- }
149143 }
150144 if (! calledUnlock) {
151145 calledUnlock = true
@@ -163,7 +157,7 @@ PlasmaCore.ColorScope {
163157 Keys .onEscapePressed : {
164158 uiVisible = ! uiVisible;
165159 if (! uiVisible) {
166- mainBlock . mainPasswordBox . text = " " ;
160+ root . clearPassword () ;
167161 }
168162 }
169163 Keys .onPressed : {
@@ -188,7 +182,10 @@ PlasmaCore.ColorScope {
188182 Timer {
189183 id: graceLockTimer
190184 interval: 3000
191- onTriggered: authenticator .tryUnlock ();
185+ onTriggered: {
186+ root .clearPassword ();
187+ authenticator .tryUnlock ();
188+ }
192189 }
193190
194191 Component .onCompleted : PropertyAnimation { id: launchAnimation; target: lockScreenRoot; property: " opacity" ; from: 0 ; to: 1 ; duration: 1000 }
Original file line number Diff line number Diff line change @@ -64,12 +64,10 @@ PlasmaCore.ColorScope {
6464 function onPrompt (msg ) {
6565 root .notification = msg;
6666 mainBlock .echoMode = TextInput .Normal
67- mainBlock .mainPasswordBox .text = " " ;
6867 mainBlock .mainPasswordBox .forceActiveFocus ();
6968 }
7069 function onPromptForSecret (msg ) {
7170 mainBlock .echoMode = TextInput .Password
72- mainBlock .mainPasswordBox .text = " " ;
7371 mainBlock .mainPasswordBox .forceActiveFocus ();
7472 }
7573 }
@@ -141,12 +139,8 @@ PlasmaCore.ColorScope {
141139 if (blockUI) {
142140 fadeoutTimer .running = false ;
143141 } else if (uiVisible) {
144- mainBlock .mainPasswordBox .forceActiveFocus ();
145142 fadeoutTimer .restart ();
146143 }
147- if (! uiVisible) {
148- lockScreenRoot .forceActiveFocus ();
149- }
150144 if (! calledUnlock) {
151145 calledUnlock = true
152146 authenticator .tryUnlock ();
@@ -163,7 +157,7 @@ PlasmaCore.ColorScope {
163157 Keys .onEscapePressed : {
164158 uiVisible = ! uiVisible;
165159 if (! uiVisible) {
166- mainBlock . mainPasswordBox . text = " " ;
160+ root . clearPassword () ;
167161 }
168162 }
169163 Keys .onPressed : {
@@ -188,7 +182,10 @@ PlasmaCore.ColorScope {
188182 Timer {
189183 id: graceLockTimer
190184 interval: 3000
191- onTriggered: authenticator .tryUnlock ();
185+ onTriggered: {
186+ root .clearPassword ();
187+ authenticator .tryUnlock ();
188+ }
192189 }
193190
194191 Component .onCompleted : PropertyAnimation { id: launchAnimation; target: lockScreenRoot; property: " opacity" ; from: 0 ; to: 1 ; duration: 1000 }
You can’t perform that action at this time.
0 commit comments