Do you know how you got hacked? This is very serious since electrum seems to be the preferred wallet for most etc.
As the OP stated... He downloaded malware... It wasn't a security flaw in Electrum
How do electrum wallets get hacked?
Through poor security practices by wallet owners... For instance, downloading infected software that installs viruses/trojans/malware...
Insecure/non-updated operating systems that have unpatched bugs that allow hackers access...
Once the malware is on the machine, there are various ways they can leak the info to the hacker, some detect certain programs and send screenshots, so they can see when your seed/private key is displayed... Some scan for wallet files... and then log keystrokes so they can detect passwords etc
Some just trick you into sending coins to the wrong address but replacing addresses detected on the clipboard with their own