This has to do with social skills.
When a man hears you complaining a lot, he sees someone who struggles and is unhappy.
He feels this in you and by being with you he picks it up.
What uplifts you more? Being with someone who is radiantly positive or someone who seems very stressed and totally unhappy?
See how it works?
When he hears you complaining or criticising a lot, he sees someone who is difficult to be with.
Shift that pattern and start expressing positiveness! It will multiply your chances with guys!
To your love life!
PS: positiveness doesn't need to be shallow. You know that, right?