That was a backhanded compliment about my new haircut.
backhanded compliment
idiomAn insult disguised as a compliment; a compliment which can be interpreted as an insult.
Origin
disputed originCompound of backhanded + compliment. Similar figurative uses of backhanded are attested from at least the early 19th century.
She gave me a backhanded compliment by saying I looked great for my age.
His remark was clearly a backhanded compliment, as he praised my work while implying it was surprisingly competent for someone with my limited experience.