PasswordDialog: the reveal button shows the crossed-out eye while the password shows (pat2:34)

This commit is contained in:
aiongg
2026-11-12 14:32:44 +00:00
parent d8a0d6c36d
commit e4193b33fd
@@ -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() {