Fixed #501 add password prop to input (#502)

This commit is contained in:
viandox 2022-07-25 11:28:28 +02:00 committed by GitHub
parent 1596c2de9b
commit 962c06c0ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -440,6 +440,10 @@ fn build_gtk_input(bargs: &mut BuilderArgs) -> Result<gtk::Entry> {
connect_signal_handler!(gtk_widget, gtk_widget.connect_activate(move |gtk_widget| {
run_command(timeout, &onaccept, &[gtk_widget.text().to_string()]);
}));
},
// @prop password - if the input is obscured
prop(password: as_bool = false) {
gtk_widget.set_visibility(!password);
}
});
Ok(gtk_widget)