From d801350eb2311624a1fb51372361d30d19ecc9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Aritz?= Date: Mon, 27 Feb 2023 15:35:44 +0100 Subject: [PATCH] Use password TextEdit to hide the password --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7092d19..ad566ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ use std::fs; use std::time::SystemTime; use directories::ProjectDirs; use eframe::Frame; -use egui::{Context, RichText}; +use egui::{Context, RichText, TextEdit, Widget}; use log::info; use simple_logger::SimpleLogger; use crate::notes::{Note, NoteMetadata}; @@ -172,7 +172,7 @@ impl eframe::App for App { ui.label(RichText::new("after starting the app, the password will be tested against the latest note").italics()); ui.add_space(10.0); - ui.text_edit_singleline(&mut self.password_buffer); + TextEdit::singleline(&mut self.password_buffer).password(true).ui(ui); if ui.button("start app").clicked() { self.password = Some(self.password_buffer.clone());