mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 02:54:25 +00:00
PasswordDialog: the reveal button shows the crossed-out eye while the password shows (pat2:34)
This commit is contained in:
@@ -311,7 +311,11 @@ impl<'a> PasswordDialog<'a> {
|
||||
}
|
||||
let text = text.show(ui);
|
||||
let name = if entries.reveal { words.hide.clone() } else { words.show.clone() };
|
||||
let reveal = ToggleButton::new(name, Bind::bound(&mut entries.reveal)).icon(IconId::new("eye")).icon_only().show(ui);
|
||||
let reveal = ToggleButton::new(name, Bind::bound(&mut entries.reveal))
|
||||
.icon(IconId::new("eye"))
|
||||
.on_icon(IconId::new("eye_off"))
|
||||
.icon_only()
|
||||
.show(ui);
|
||||
// Typing goes on in the field: the reveal button hands the focus back, as does a press that left
|
||||
// nothing focused.
|
||||
if clicked(reveal.response()) || focus::focused_rec(ui.ctx()).is_none() {
|
||||
|
||||
Reference in New Issue
Block a user