Keyboard based nav no longer reveals password layout
This commit is contained in:
parent
defe26acc3
commit
4c7bd2694f
@ -34,7 +34,6 @@ reqwest = { version = "0.13.3", features = ["json", "default-tls"] }
|
|||||||
|
|
||||||
magick_rust = "2.0.0"
|
magick_rust = "2.0.0"
|
||||||
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
#slint-build = "1.16.1"
|
#slint-build = "1.16.1"
|
||||||
slint-build = { git = "https://github.com/slint-ui/slint", branch = "master" }
|
slint-build = { git = "https://github.com/slint-ui/slint", branch = "master" }
|
||||||
|
|||||||
@ -140,6 +140,24 @@ export component LineEditBase implements LineEditInterface inherits Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
key-pressed(event) => {
|
key-pressed(event) => {
|
||||||
|
if (!root.password-revealed && event.modifiers.control) { // Don't reveal the delimiter positions in the password if it's hidden
|
||||||
|
if (event.text == Key.LeftArrow) {
|
||||||
|
if (event.modifiers.shift) {
|
||||||
|
self.set-selection-offsets(0, self.cursor-position-byte-offset);
|
||||||
|
} else {
|
||||||
|
self.set-selection-offsets(0, 0);
|
||||||
|
}
|
||||||
|
return accept;
|
||||||
|
}
|
||||||
|
if (event.text == Key.RightArrow) {
|
||||||
|
if (event.modifiers.shift) {
|
||||||
|
self.set-selection-offsets(self.cursor-position-byte-offset, self.text.character-count);
|
||||||
|
} else {
|
||||||
|
self.set-selection-offsets(self.text.character-count, self.text.character-count);
|
||||||
|
}
|
||||||
|
return accept;
|
||||||
|
}
|
||||||
|
}
|
||||||
root.key-pressed(event)
|
root.key-pressed(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user