From e4193b33fd95fb3bdb4faf4602fead7b231ed237 Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 12 Nov 2026 01:43:25 +0000 Subject: [PATCH] PasswordDialog: the reveal button shows the crossed-out eye while the password shows (pat2:34) --- crates/ui-patterns/src/patterns/form_dialogs/password.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/ui-patterns/src/patterns/form_dialogs/password.rs b/crates/ui-patterns/src/patterns/form_dialogs/password.rs index 228ffda19..907672343 100644 --- a/crates/ui-patterns/src/patterns/form_dialogs/password.rs +++ b/crates/ui-patterns/src/patterns/form_dialogs/password.rs @@ -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() {