commit dd35eeb8f25d980edd5779355a726ced03e50183
parent 330d316f0501c392562108c1157ea1524ada69bb
Author: therealFIGBERT <figbertwelner@gmail.com>
Date: Wed, 24 Jul 2019 12:24:06 -0700
Adding show/hide functionality to password fields on right click
Diffstat:
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/Scripts/figENC.py b/Scripts/figENC.py
@@ -16,10 +16,11 @@ class App():
Keyword arguments:
root -- the Tk() frame for the main window
"""
+ self.crypto_mode = ""
+ self.show_pass = False
+
with open("settings.json") as settings_file:
settings = json.load(settings_file)
-
- self.crypto_mode = ""
root.wm_title("figENC")
self.canvas = tk.Canvas(
@@ -170,6 +171,7 @@ class App():
highlightthickness=0,
insertbackground="#F2DAFF"
)
+ self.passcode_input.bind("<Button-2>", self.toggle_pass)
self.confirm_label = tk.Label(
self.passcode_frame,
text="Confirm passkey",
@@ -195,6 +197,7 @@ class App():
highlightthickness=0,
insertbackground="#F2DAFF"
)
+ self.confirm_input.bind("<Button-2>", self.toggle_pass)
self.save = tk.Frame(self.step_two, bg="#1A181C", pady="8")
self.save_label = tk.Label(
self.save,
@@ -736,6 +739,16 @@ class App():
self.settings["scroll"] = self.bool_val
self.frame.update()
+ def toggle_pass(self, *args):
+ if self.show_pass:
+ self.passcode_input.config(show="")
+ self.confirm_input.config(show="")
+ self.show_pass = not self.show_pass
+ else:
+ self.passcode_input.config(show="*")
+ self.confirm_input.config(show="*")
+ self.show_pass = not self.show_pass
+
if __name__ == "__main__":
root = tk.Tk()
App(root)
diff --git a/Scripts/tips.json b/Scripts/tips.json
@@ -9,5 +9,6 @@
"figENC uses a unique encryption algorithm to provide\nRSA encryption to files of any size.",
"figENC uses multilayer encryption. To encrypt or decrypt, you need\nat least two of the three keys.",
"figENC's RSA encryption is military grade, and has never been broken\nby hackers or governments.",
- "fonts in figENC are relative – there's one font size in settings,\nand other sizes are determined based on that selection"
+ "fonts in figENC are relative – there's one font size in settings,\nand other sizes are determined based on that selection",
+ "right click on the password entry fields to toggle text visibility. Peekaboo!"
]
\ No newline at end of file