Add visual effect for disabled textfields and clean gui when closing the window

Clean up the gui when closing the window with a shortcut reduces the number of memory leaks.